Ver Mensaje Individual
  #1 (permalink)  
Antiguo 24/10/2010, 02:26
Japert
 
Fecha de Ingreso: julio-2010
Mensajes: 8
Antigüedad: 13 años, 10 meses
Puntos: 0
AYUDA: Warning con: Cannot modify header information

Buenas quisiera pedir ayuda sobre esto del header con redireccion, en todos lados dice que tengo que borrar los espacios en blanco, pero yo no veo ninguno y me estresa.
Se supone que el error esta en la linea 57, pero yo no encuentra nada. les mando aqui el error y mi codigo por si acaso me puedan ayudar. Gracias

Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\wee\log.php:57) in C:\xampp\htdocs\wee\log.php on line 64

Código PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
body,td,th {
    font-family: Verdana, Geneva, sans-serif;
}
h1,h2,h3,h4,h5,h6 {
    font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
}
h1 {
    color: #036;
}

table.gen {
    border-style: dashed;
    border-color:#069;
    border-width:2px;
    
    }
div.dri{
    color:#C00; font-size:9px;
    font-family:Verdana, Geneva, sans-serif;
    visibility:hidden;
    /**float:right**/
    }
div.dle{
    float:left;
    
    }
</style>
<script language="javascript" type="text/javascript">
    function confirma(){
        document.getElementById("msg2").style.visibility="hidden";
        document.getElementById("msg1").style.visibility="hidden";
        
        if(document.f1.login.value=="" || document.f1.pass.value==""){
            if(document.f1.pass.value==""){
                document.getElementById("msg2").style.visibility="visible";
                document.getElementById("pass").focus();
                }
            if(document.f1.login.value==""){
                document.getElementById("msg1").style.visibility="visible";
                document.getElementById("login").focus();
                }
                                
            return false
            }
        else {
            return true
            }
        }
    function error(){
        alert('The password is not compatible for that login, check your data.');}
</script>
<?php
    
if($_POST){
        
$login=$_POST['login'];
        
$password=$_POST['pass'];
        
$phase=$_POST['phase'];
        
        if(
$login=="japert" && $password=="Abendschlussel"){
            
header("Location: away.php");

            }
        else{
            
$text="<input type=\"text\" name=\"login\" id=\"login\" value=\"".$login."\" />";
            
?>
            <script language="javascript">
            error();
            </script>
            <?php
            
}
        }
    else{
        
$text="<input type=\"text\" name=\"login\" id=\"login\" />";
        }
?>
<title>Welcome</title>

</head>

<body>


<table  width="600" class="gen"  align="center"   cellpadding="0" cellspacing="0">
  <tr>
    <td align="center" valign="middle"><h1>Welcome to Paradise</h1></td>
  </tr>
  <tr>
    <td>
    <form  name="f1" action="log.php" method="post" onsubmit="return confirma(this);">
    <table width="600" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>
    <table width="600" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td  width="50%" height="40" align="right">Login:&nbsp;&nbsp;&nbsp;</td>
    <td><div class="dle"><?php echo $text?><!--<input type="text" name="login" id="login" />--></div><div id="msg1" class="dri" >*type your username</div></td>
  </tr>
  <tr>
    <td width="50%" height="40" align="right">Phase Factor:&nbsp;&nbsp;&nbsp;</td>
    <td>
    <select name="phase">
    <optgroup label="Phases">
        <option value="Terror of Death" selected="selected" > Terror of Death </option>
        <option value="Mirage of Deceit" > Mirage of Deceit </option>
        <option value="Propagation" > Propagation </option>
        <option value="Prophet" > Prophet </option>
        <option value="Machinator" > Machinator </option>
        <option value="Temptation" > Temptation </option>
        <option value="Avenger" > Avenger </option>
        <option value="Rebirth" > Rebirth </option>
     </optgroup>
    </select>
    </td>
  </tr>
  <tr>
    <td width="50%" height="40" align="right">Password:&nbsp;&nbsp;&nbsp;</td>
    <td><div class="dle"><input type="password" name="pass" id="pass"  /></div><div id="msg2" class="dri" >*type your password</div></td>
  </tr>
</table>

    </td>
  </tr>
  <tr>
    <td align="center">
    <br />
    <input type="submit"  name="entra" value="Ingresar" />
    <br />
    <br />
    </td>
  </tr>
</table>

    
    </form>
    </td>
  </tr>

</table>

</body>
</html>