mira esto y moficalo a tu antojo
correo.php
Código PHP:
<?
if (!$HTTP_POST_VARS){
?>
</p>
<form name="enviar" action="contact.php" method="post">
<div align="center">
<br><br><br>
<table width="58%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2">Please enter the following information
or register:</td>
</tr>
<tr>
<td colspan="2"><img src="imagenes/spacer.gif" width="1" height="10"></td>
</tr>
<tr>
<td width="32%">First Name:</td>
<td width="68%"><input type=text name="nombre" class="t_n" size=25></td>
</tr>
<tr>
<td><img src="archivos_index/spacer.gif" width="1" height="5"></td>
</tr>
<tr>
<td>Last Name:</td>
<td><input type="text" name="apellido" class="t_n" size="25"></td>
</tr>
<tr>
<td colspan="2"><img src="imagenes/spacer.gif" width="1" height="5"></td>
</tr>
<tr>
<td>Phone Number:</td>
<td><input type="text" class="t_n" size="5" maxlength="3" name="textfield">
<input type="text" name="phone" class="t_n" maxlength="7" size="16"></td>
</tr>
<tr>
<td colspan="2"><img src="imagenes/spacer.gif" width="1" height="5"></td>
</tr>
<tr>
<td>E-mail:</td>
<td><input type="text" class="t_n" size="25" name="mail"></td>
</tr>
<tr>
<td> </td>
<td><img src="archivos_index/spacer.gif" width="1" height="5"></td>
</tr>
<tr>
<td height="125" valign="top">Comments:</td>
<td><textarea name="coment" cols="32" rows="6" wrap="VIRTUAL" class="t_n"></textarea></td>
</tr>
</table>
<img src="imagenes/spacer.gif" width="1" height="5"><br>
<br>
<input type="button" name="Submit" value="Submit" class="t_n" onClick="check_form()"> <input value="Reset" class="t_n" type="reset">
<br><br> <?
}else{
//Estoy recibiendo el formulario, compongo el cuerpo
$cuerpo = "Formulario enviado\n";
$cuerpo .= "Nombre: " . $HTTP_POST_VARS["nombre"] . "\n";
$cuerpo .= "Apellido: " . $HTTP_POST_VARS["apellido"] . "\n";
$cuerpo .= "Telefono: " . $HTTP_POST_VARS["phone"] . "\n";
$cuerpo .= "Email: " . $HTTP_POST_VARS["mail"] . "\n";
$cuerpo .= "Comentarios: " . $HTTP_POST_VARS["coment"] . "\n";
//mando el correo...
mail("[email protected]","Formulario recibido",$cuerpo);
echo "<br><br><br><br>";
//doy las gracias por el envío
echo "<div align='center'>Your comments have been send succesfully.</div>";
}
echo "<br><br>";
echo "<div align='center'><input type='button' class='t_n' value='Back' onclick='window.history.back()'></div>";
?>
</div>
</form>
salu2