Ver Mensaje Individual
  #1 (permalink)  
Antiguo 14/11/2013, 21:15
JuanPablo1234
 
Fecha de Ingreso: noviembre-2013
Mensajes: 6
Antigüedad: 10 años, 5 meses
Puntos: 0
Tengo problemas con php

Ayuda me sale esto en php:

PHP Error Message

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/a9280901/public_html/verificainicio.php on line 35

Free Web Hosting

PHP Error Message

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/a9280901/public_html/verificainicio.php on line 37

Free Web Hosting
EL USUARIO O LA CLAVE NO ESTAN REGISTRADOS
REGRESAR
PHP Error Message

Warning: mysql_close(): supplied argument is not a valid MySQL-Link resource in /home/a9280901/public_html/verificainicio.php on line 67

Free Web Hosting

Mi código es:

Código PHP:
Ver original
  1. <?php
  2.  
  3. if ($_POST ['user']=="")
  4. {
  5.     echo "INTRODUCE UN USUARIO";
  6.     echo "<br><a href='javascript:history.go(-1)'>REGRESAR</a>";
  7.     exit();
  8. }
  9.  
  10. if ($_POST ['pass']=="")
  11. {
  12.     echo "INTRODUCE UN PASSWORD";
  13.     echo "<br><a href='javascript:history.go(-1)'>REGRESAR</a>";
  14.     exit();
  15. }
  16.  
  17. include("conexion.php");
  18.  
  19. $usuario_duplicado=mysql_query("SELECT * FROM acceso WHERE user='". $_POST["user"] ."'", $conexion);
  20. $num_registros=mysql_num_rows($usuario_duplicado);
  21.  
  22. if ($num_registros>0)
  23. {
  24.  // Mostrar la pagina PRINCIPAL
  25.  $fila=mysql_fetch_array($usuario_duplicado);
  26.  setcookie("usuario_nombre",$fila["nombre"]);
  27. $_SESSION["usuario"]=$fila["user"];
  28.  
  29.  header("location:index.html");
  30. }else
  31.  
  32.  echo "EL USUARIO O LA CLAVE NO ESTAN REGISTRADOS";
  33.  
  34.  echo "<br><a href='javascript:history.go(-1)'>REGRESAR</A>";
  35.  //$invalida="invalida";
  36.  mysql_close($conexion);
  37. ?>

Última edición por Triby; 15/11/2013 a las 02:00 Razón: Código en Highlight