Google
Web dns.bdat.net

[PHP-ES] Warning: Cannot modify header information - headers already sent by (output started at /users/alumni/a/al020472/www/Buscador web/index.php:2)

Write haof XML files: Adrian Ferreres Esteller ( al020472@alumail.uji.es)
Fecha: lun 09 may 2005 - 12:24:52 CEST


Hola lista:

   ¿Podeis hecharme una mano con las practicas de cliente- servidor? La idea es
crear un buscador web minimamente decente. Ahora toca programar la interfaz del
buscador en php y los profes me han pedido que, mediante coockies el buscador se
acuerda de la ultima busqueda realizada por el usuario, es decir, que si el
usuario pulsa el buton de marcha atras del navegador le salga en el cuadro de
texto de la busqueda su ultima busqueda. El codigo de la interfaz del buscador
es el siguiente:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php
if (!isset ($busqueda))
  {
    setcookie ("busqueda","",time()+3600);
  }
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Buscador IP WEB</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
</head>
<body bgcolor="#FFFFFF">
<table width="100%" border="0" cellspacing="0" cellpadding="4">
  <tr>
    <td align="center"> <font color="#99FF99"><img
src="mm/stationery/_V_Master/titulo copiar.jpg" alt="IP WEB" name="image"
width="780" height="80"/>
      </font></td>
  </tr>
</table>
<p>&nbsp; </p>
<form action="resultado.php" method="post">
<label for="clave_busqueda" accesskey="b">
<table width="633" border="1" align="center">
  <tr>
    <th width="133" rowspan="2" align="center" valign="top"><input type="image"
src="Lupa.gif" width="131" height="131" alt="Boton Lupa"/></th>
    <td width="310" height="41" align="center" bgcolor="#CCFFFF">
      <h3><font face="Comic Sans MS">Da una orden al detective</font></h3></td>
    <td width="168" rowspan="2"><strong><font face="Comic Sans MS">Pulsa sobre
      la lupa para que el detective inicie su busqueda.</font></strong></td>
  </tr>
  <tr>
<?php
if ($busqueda=="")
  {
    echo "<td><input name='clave_busqueda' id='clave_busqueda' type='text'
size='50'/></td>";
  }
else
  {
     echo "<td><input name='clave_busqueda' id='clave_busqueda' type='text'
size='50' value='".$busqueda."'/>";
  }
?>
  </tr>
</table>
</label>
</form>
<p>&nbsp; </p>
<a
href=" http://validator.w3.org/check?uri=www4.uji.es/~al020472/Buscador%20web/index.htm"><img
src="imagenes/valid-xhtml10.png" alt="Validacion en XHTML"/></a>
</body></html>

Y cuando lo ejecuto me da el siguiente error:

Warning: Cannot modify header information - headers already sent by (output
started at /users/alumni/a/al020472/www/Buscador web/index.php:2)

¿Alguien me puede dar una pista de como solucionarlo?

Muchas Gracias

-- 
PHP Spanish Localization Talk Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Este archivo fue generado por hypermail 2.1.7 : sáb 18 mar 2006 - 18:24:01 CET