Ver Mensaje Individual
  #7 (permalink)  
Antiguo 07/03/2004, 13:04
YoannaXP
 
Fecha de Ingreso: febrero-2004
Ubicación: Orlando Florida
Mensajes: 6
Antigüedad: 21 años
Puntos: 0
<?
if (!$HTTP_POST_VARS){
?>
<form action="contact.php" method=post>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="79%">
<tr>
<td width="61%">Nombre : </td>
<td width="70%"><input type=text name="nombre" size=25></td>
</tr>
<tr>
<td width="61%">Empresa : </td>
<td width="70%"><input type=text name=empresa size=25></td>
</tr>
<tr>
<td width="61%">Mail : </td>
<td width="70%"><input type=text name=email size=25></td>
</tr>
<tr>
<td width="61%">Telefono : </td>
<td width="70%"><input type=text name=telefono size=25></td>
</tr>
<tr>
<td width="61%">Mensaje : </td>
<td width="70%"><textarea name=coment cols=32 rows=5></textarea></td>
</tr>
<tr>
<td width="81%"></td>
<td width="50%">
<p align="center"><input type=submit value="Enviar"></td>
</tr>
</table>
</form>
<?
}else{
//Estoy recibiendo el formulario, compongo el cuerpo
$asunto = "Mensaje desde Forosdelweb.com";
$cuerpo .= "Nombre : " . $HTTP_POST_VARS["nombre"] . "\n";
$cuerpo .= "Email : " . $HTTP_POST_VARS["email"] . "\n";
$cuerpo .= "Empresa : " . $HTTP_POST_VARS["empresa"] . "\n";
$cuerpo .= "Telefono : " . $HTTP_POST_VARS["telefono"] . "\n";
$cuerpo .= "Comentario : " . $HTTP_POST_VARS["coment"] . "\n";
$headers .= "From: " . $HTTP_POST_VARS["nombre"] . " <" . $HTTP_POST_VARS["email"] . ">\r\n";
$to .= "Miguel Angel <[email protected]>\n";
$headers .= "From: " . $HTTP_POST_VARS["nombre"] . " <" . $HTTP_POST_VARS["email"] . ">\r\n";
$headers .= "BCC: Rosa Maria <[email protected]>\r\n";
//mando el correo...
mail($to,$asunto,$cuerpo,$headers);


//doy las gracias por el envío
echo "Se ha enviado un correo a [email protected] correctamente.";
echo "<br>";
echo "<input type='submit' value='Regresar' onclick='window.history.back()'>";
}
?>
</body>
</html>

YO ASI DECLARO VARIABLES; " .HTTP_POST_VARS["variable"]. "

CHECALO , VERAS KE SIRVE :)