Ver Mensaje Individual
  #14 (permalink)  
Antiguo 20/05/2011, 17:59
tete_de
 
Fecha de Ingreso: mayo-2011
Ubicación: Guadalupe, N.L, México
Mensajes: 45
Antigüedad: 13 años, 8 meses
Puntos: 6
Respuesta: Warning: session_start() [function.session-start]: Cannot send session cac

para no confundirte este es el bueno:
Código PHP:
Ver original
  1. <?php
  2.      
  3.     session_start();
  4.      
  5.     include("baseDeDatosSinTesteo.php");
  6.      
  7.     $consulta= "Select count(*) as contador from usuarios where nombre='".$_POST["txtNombre"]."' and
  8.              contraseña='".$_POST["pwdContraseña"]."'";
  9.                
  10.     $usuarios=mysql_query($consulta);
  11.      
  12.     while ($elUsuario=mysql_fetch_array($usuarios)){
  13.         $tot =$elUsuario["contador"];
  14.     }
  15.      
  16.     echo $tot;
  17.      
  18.     if($tot<>0){
  19.     $_SESSION["esActivo"]="si";
  20.     ?>
  21.     <SCRIPT language="JavaScript">
  22.     <!--
  23.     window.location="http://tu pagina/web.php";
  24.     //-->
  25.     </SCRIPT>
  26.     <?php
  27.     }else{
  28.     ?>
  29.     <SCRIPT language="JavaScript">
  30.     <!--
  31.     window.location="http://tu pagina/SinPermiso.php";
  32.     //-->
  33.     </SCRIPT>
  34.     <?php
  35.     }
  36.      
  37.     ?>