Ver Mensaje Individual
  #9 (permalink)  
Antiguo 24/10/2010, 17:39
wambax
 
Fecha de Ingreso: octubre-2010
Ubicación: venezuela
Mensajes: 9
Antigüedad: 13 años, 6 meses
Puntos: 0
Respuesta: Autentificacion multiusuario con PHP y MySQL tomando en cuenta su ID de Us

Listo amigo lo hice como me dijiste pero no hace lo que se quiere... mi pregunta es sera que esta funcion la estoy haciendo mal?

Código PHP:
Ver original
  1. //Comprobando si la IDs y el directorio son iguales
  2.     function acceso_id()
  3.     {
  4.         global $db,$db_table_prefix;
  5.        
  6.         $sql = "SELECT
  7.                User_ID
  8.                FROM
  9.                ".$db_table_prefix."Users
  10.                WHERE
  11.                User_ID = '".$db->sql_escape($this->user_id)."'";
  12.        
  13.         $result = $db->sql_query($sql);
  14.        
  15.         $row = $db->sql_fetchrow($result);
  16.        
  17.         return ($row['User_ID']);
  18.     }
  19.  
  20.  
  21.  
  22.             //Aqui hago la validacion
  23.                 if ($group2['User_ID'] == $contar)
  24.                 {
  25.                 header ("Location: prohibida.php");
  26.                 }
  27.                 else
  28.                 {
  29.                 header("Location: no_acceso.php");
  30.                 }