Ver Mensaje Individual
  #3 (permalink)  
Antiguo 06/03/2012, 00:55
Avatar de repara2
repara2
 
Fecha de Ingreso: septiembre-2010
Ubicación: München
Mensajes: 2.445
Antigüedad: 13 años, 7 meses
Puntos: 331
Respuesta: codigo no funciona bien

Código PHP:
Ver original
  1. <?php
  2. mysql_connect("localhost", "user", "0000" ) or die(mysql_error());
  3.  
  4. $nick = mysql_real_string($_POST["nick"]);
  5.  
  6. $result = mysql_query("SELECT * FROM usuarios WHERE nick='$nick';");
  7. if($row = mysql_fetch_assoc($result))//Devuelve un array asociativo de cadenas que corresponde a la fila recuperada, o FALSE si no hay más filas disponibles.
  8. {
  9.     setcookie("usNick",$nick,time()+7776000);
  10.     echo header ("Location: http://www.pag-.com/reg.php");
  11. }//if($row = mysql_fetch_array($result))
  12. else
  13. {
  14.     echo header ("Location: http://www.pag.com/clavein.html");
  15. }
  16. ?>
__________________
Fere libenter homines, id quod volunt, credunt.