Ver Mensaje Individual
  #13 (permalink)  
Antiguo 01/06/2004, 13:25
Avatar de Reynier
Reynier
 
Fecha de Ingreso: noviembre-2002
Ubicación: Por ahí en algún sitio
Mensajes: 1.844
Antigüedad: 21 años, 5 meses
Puntos: 1
Prueba así

Prueba así haber:
Código PHP:
<?php
 $conexion 
mysql_connect('localhost','root','');
 
mysql_select_db ("archivo"$conexion);
 
$sql="SELECT COUNT(*) AS cant FROM usuarios WHERE usuario='".$_POST['usuario']."' AND pass='".$_POST['contrasena']."'";
 
$resultado=mysql_query($sql) or die(mysql_error());
 
$fetch mysql_fetch_assoc($resultado);
 if((
$fetch['usuario']==$_POST['usuario']) && ($fetch['pass']==$_POST['contrasena'])){
    
session_start();
    
session_register("autentificado");
    
$autentificado "SI";
    
header ("Location: aplicacion.php");
 }else{
    
header("Location: index.php?errorusuario=si");
 }
 
mysql_close($conexion);
?>
Salu2
__________________
Ing. Reynier Pérez Mira