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

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

Si no sabes como funciona esto del window location te dejo este link:
[URL="http://translate.google.com/translate?hl=es&sl=en&u=http://www.pageresource.com/jscript/jredir.htm&ei=_vnWTfLbGMjn0QGt1o3DDA&sa=X&oi=trans late&ct=result&resnum=1&ved=0CB0Q7gEwAA&prev=/search%3Fq%3Dwindows.location%2Bjavascript%26hl%3D es%26client%3Dfirefox-a%26hs%3Ds4Z%26rls%3Dorg.mozilla:es-ES:official%26biw%3D1024%26bih%3D445%26prmd%3Divns "]Link en Ingles Traducida al español[/URL]
Si no funciona esntonces ten este otro link (en ingles):
[URL="http://www.pageresource.com/jscript/jredir.htm"]http://www.pageresource.com/jscript/jredir.htm[/URL]

Espero que sirva de algo esto...