Ver Mensaje Individual
  #7 (permalink)  
Antiguo 23/09/2012, 17:24
FokuZScripter
 
Fecha de Ingreso: septiembre-2012
Mensajes: 12
Antigüedad: 11 años, 7 meses
Puntos: 0
Respuesta: Problema Undefined Index

Cita:
Iniciado por rodrigo791 Ver Mensaje
Código PHP:
Ver original
  1. if(isset($_POST['pw']) == ($sesion['PW'])) {

cambia eso, por esto

Código PHP:
Ver original
  1. if(isset($_POST['pw']) and $_POST['pw'] == ($sesion['PW'])) {
Lo coloqué y cuento que volvió el error, al parecer si Lee el nombre en la Base de Datos porque al introducirlo mal sale que los datos fueron introducidos incorrectamente, ahora, si coloco bien el nombre y la contraseña me sale:

Notice: Undefined index: pw in C:\xampp\htdocs\login\verificar.php on line 13

Aquí en Index desde donde Logueo, espero que sea de ayuda.

Código PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml">
<
head>
<
meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<
title>Documento sin título</title>
</
head>

<
body>
<
form id="form1" name="form1" method="post" action="verificar.php">
  <
p>Nombre:     
    <
label for="nombre"></label>
  <
input name="nombre" type="text" id="nombre" maxlength="20" />
  </
p>
  <
p>Contraseña
    <
input name="pw" type="password" id="pw" maxlength="20" />
  </
p>
  <
p>
    <
input type="submit" name="submit" id="submit" value="LogIn" />
  </
p>
</
form>
</
body>
</
html