Ver Mensaje Individual
  #1 (permalink)  
Antiguo 19/03/2004, 10:05
aruizroldan
 
Fecha de Ingreso: octubre-2003
Mensajes: 280
Antigüedad: 20 años, 5 meses
Puntos: 1
Enviar Formulario a email

Hola a todos. Quiero enviar un formulario a un email, de forma que lleguen las variables en php dentro de un codigo en php, para que cuando llegue, simplemente se inserte dentro del codigo html. No se si esto que he hecho, está bien. Supongo que no porque lo he probado y no funciona. Si es asi, decidme la forma en que se podria cambiar.

Este es el codigo :

<?php
$destinatario = "[email protected]";
$asunto = "Registro Usuarios";
$cuerpo ="
<br>
<div align="center">
<table border="0" cellspacing="0" cellpadding="0" width="434" bgcolor="#FFFFFF">
<tr>
<td height="37" background="images/bar02.gif" width="97%"><p class="header3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;HOSTAL
$hostal - Ref : 0001</p></td>
</tr>
<tr valign="top">
<td height="322"> <br>
<a href="" onClick="window.open('./images/foto1.jpg','','width=700,height=500');return false"> <img src="./images/foto1-p.jpg" width="124" height="120" alt="" border="0" hspace="15" align="left"> </a>
<p class="copyrighttext">&nbsp;DIRECCI&Oacute;N :
$direccion - $ciudad($poblacion)</p>
<p class="copyrighttext"> CARACTERÍSTICAS PRINCIPALES : $caractaristicas </p>
<p class="copyrighttext">PRECIOS : </p>
<table class="copyrighttext" width="100%" border="0">
<tr bgcolor="#CCCCCC">
<td width="19%"><div align="center">HABITACION</div></td>
<td width="27%"><div align="center">T.ALTA($diaaltauno-$mesaltauno
a $diaaltados-$mesaltados)</div></td>
<td width="29%"><div align="center">T.MEDIA ($diamediauno-$mesmediauno
a $diamediados-$mesmediados)</div></td>
<td width="25%"><div align="center">T.BAJA ($diabajauno-$mesbajauno
a $diabajados-$mesbajados)</div></td>
</tr>
<tr>
<td><div align="center">Individual</div></td>
<td><div align="center">27</div></td>
<td><div align="center">24</div></td>
<td><div align="center">18</div></td>
</tr>
<tr>
<td><div align="center">Doble</div></td>
<td><div align="center">42</div></td>
<td><div align="center">36</div></td>
<td><div align="center">30</div></td>
</tr>
<tr>
<td><div align="center">Triple</div></td>
<td><div align="center">63</div></td>
<td><div align="center">54</div></td>
<td><div align="center">42</div></td>
</tr>
<tr>
<td><div align="center">Cuadruple</div></td>
<td><div align="center">72</div></td>
<td><div align="center">66</div></td>
<td><div align="center">54</div></td>
</tr>
</table>

<p class="copyrighttext">COMEDOR : $comedor</p>
<p class="copyrighttext">OTROS SERVICIOS : $servicios</p>
<p class="copyrighttext">FOTOGRAFIAS : </p>
</td>
</tr>
<tr>
<td background="images/bar03.gif" height="93">
<table width="99%" height="65" border="0">
<tr>
<td><div align="center"><img src="./images/foto2-p.jpg" width="78" height="50"></div></td>
<td><div align="center"><img src="./images/foto2-p.jpg" width="78" height="50"></div></td>
<td><div align="center"><img src="./images/foto2-p.jpg" width="78" height="50"></div></td>
<td><div align="center"><img src="./images/foto2-p.jpg" width="78" height="50"></div></td>
</tr>
</table></td>
</tr>
</table>
</div></td>
<td width="24" valign="top"><font size="1">&nbsp;</font></td>
</tr>

<tr>
<td valign="top" colspan="3"><img src="images/mainbot.gif" border="0"></td>
</tr>
</table>

";

mail($destinatario,$asunto,$cuerpo);
header("location:http://www.uco.es/~b92hijia/hostal/registrate.html");

$agradecimiento="MENSAJE DE REDIRECCIONAMIENTO :
\n-------------------------------
\nEstimado/a $nombre:
\n\tLos datos del formulario han sido recibidos satisfactoriamente.
\nSi encontramos algun error recibira un mensaje especificandolo.
\nY en el caso de que revisemos que ha realizado el pago adecuado,
\nse le volverá a enviar otro mensaje. En un caso o en otro, el mensaje
\nlo recibira en un plazo maximo de 24 horas.
\nSerá entonces cuando se dé de alta en nuestra base de datos.
\nGracias por participar.
\nhttp://www.alaporra.com.";

mail($mail,"Gracias por registrar su hostal",$agradecimiento);


?>

Gracias.