Ver Mensaje Individual
  #1 (permalink)  
Antiguo 14/07/2008, 01:39
Avatar de jose mario
jose mario
 
Fecha de Ingreso: abril-2007
Mensajes: 165
Antigüedad: 17 años
Puntos: 0
Pregunta Redireccionar Wap con php

vengo a seccion php por que con este bello lengue trabajo
Saludos a todos una pregunta como hago para redirecionar en Wap tenog este codigo:

<?php
header("Content-type: text/vnd.wap.wml");
echo "<?xml version=\"1.0\"?>";
echo ("<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.3//EN http://www.wapforum.org/DTD/wml13.dtd\">");
?>
<wml>
<card id="card1" title="Datos">
<p>
<?php
// format and output date
if ($nombre=="" || $email=="" || $pais=="" || $estado=="" || $mensaje=="")
{
?>
Faltan datos por favor regresar y complete el formulario<br/>
<a href='libro.wml'>Regresar</a>
<?php
}
else
{
include("conexion.php");
$hoy=date("d-m-Y h:i a");
function poner($target)
{
$target = str_replace("<","&lt;",$target);
$target = str_replace(">","&gt;",$target);
$target = str_replace("á","&aacute;",$target);
$target = str_replace("é","&eacute;",$target);
$target = str_replace("í","&iacute;",$target);
$target = str_replace("ó","&oacute;",$target);
$target = str_replace("ú","&uacute;",$target);
$target = str_replace("Á","&Aacute;",$target);
$target = str_replace("É","&Eacute;",$target);
$target = str_replace("Í","&Iacute;",$target);
$target = str_replace("Ó","&Oacute;",$target);
$target = str_replace("Ú","&Uacute;",$target);
return $target;
}
$mensaje=poner($mensaje);
mysql_query("INSERT INTO libro values('Null','$hoy','$nombre','$email','$pais','$ estado','$mensaje') ") or die (mysql_error());
header("Location:index.wml");
}
?>

Inserta los datos pero no me redireciona me da error este:

Warning: Cannot modify header information - headers already sent by (output started at C:\AppServ\www\wap\libro2.php:3) in C:\AppServ\www\wap\libro2.php on line 41

ya elimine los espacios pero siguie igual o sabes otra forma de acerlo via wap se los agradecere mucho.