Ver Mensaje Individual
  #9 (permalink)  
Antiguo 04/02/2010, 11:03
ahome8990
 
Fecha de Ingreso: enero-2010
Mensajes: 39
Antigüedad: 14 años, 3 meses
Puntos: 0
Respuesta: problemas con login

sale esto pero no entiendo mucho a que se refiere con lo del header

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\xampp\htdocs\peru2business\ingreso.php on line 9

Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\peru2business\conex\conect.php:18) in C:\xampp\htdocs\peru2business\ingreso.php on line 19
Código PHP:
<?php
    
include( "conex/conect.php"); 
    
$link=Conectarse();
    
$usuario=$_POST["txtusuario"];
    
$pass=$_POST["txtpass"];
    if(
trim($usuario) != "" && trim($pass) != ""){
    
$sql="SELECT * FROM peru2business where usuario = '$usuario' and pass= '$pass'";
    
$rs mysql_query($sql,$link);
    if(
$row mysql_fetch_array($rs)){
    if(
$row['usuario']==$usuario){    
            if(
$row['pass']==$pass){
                
$_SESSION['user']='si';
                
$_SESSION["usuario"]=$row["usuario"];
                
header("Location:index.php");
    }else{echo 
'pass incorrecto';}
    }else{echo
'error usuario!!!';}
    }    
    
mysql_close($link);
    
header("Location:index.php");
    }else{echo
'identifiquese';}    

?>