Ver Mensaje Individual
  #4 (permalink)  
Antiguo 10/10/2009, 19:08
kirst
 
Fecha de Ingreso: septiembre-2009
Mensajes: 230
Antigüedad: 15 años, 5 meses
Puntos: 2
Respuesta: Notice: Undefined variable:

Jajaja
porque tienes que hacerlo así amigo:

Código PHP:
<?php require('config.php') ;

if(!empty(
$_POST['nick']) && !empty($_POST['password']) && !empty($_POST['nombre'])&& !empty($_POST['email'])){//verificamos que no esten vacios los campos
$insertar mysql_query("INSERT INTO usuarios (nick,password,nombre,email)
VALUES ('$nick','$password','$nombre','$email')"
);
}else{
?>

<form action="insertar.php" method="post">
Nick : 
<input type="text" name="nick" size=20 maxlength=20 id="nick"><BR>
Email: 
<input type="text" name="email" size=28 maxlength=100 id="email"><BR>
Password: 
<input type="password" name="password" size=28 maxlength=20 id="password"><BR>
Nombre: 
<input type="text" name="nombre" size=28 maxlength=255 id="nombre"><BR>

<input type="submit" CLASS="boton" VALUE="Registrar">
</form>

<?PHP
}
?>