Help with my php contact form? It emails and everything, but the email is

  • Thread starter Thread starter des1991
  • Start date Start date
D

des1991

Guest
blank. whats wrong? Here is what my form looks like exactly. It emails but when i open the email, its completly blank






<?php
$ToEmail = '[email protected]';
$EmailSubject = 'Layout Request ';
$name = $_POST["name"];
$email = $_POST["email"];
$myspace = $_POST["myspace"];
$type = $_POST["type"];
$colors = $_POST["colors"];
$style = $_POST["style"];
$extra= $_POST["extra"];
$details = $_POST["details"];
$payment = $_POST["payment"];
$from = "From: $visitormail\r\n";
mail($ToEmail, $EmailSubject, $MESSAGE_BODY, $mailheader) or die ("Failure");
?>


<form method="post" action="http://urban928.net/links/sendmail.php">

Name:<BR><input type="text" size="12" maxlength="12" name="name"><br />
Email:<BR><input type="text" size="12" maxlength="36" name="email"><br />
Myspace:<BR><input type="text" size="12" maxlength="36" name="myspace"><br />
Which type of layout:<br />
<input type="radio" value="Regular" name="type">Regular<br />
<input type="radio" value="Default" name="type">Default<br />
<input type="radio" value="DIV" name="type">DIV Overlay<br />
Main Colors:<BR><input type="text" size="12" maxlength="12" name="colors"><br />
Layout Style:<br />
<input type="checkbox" value="Name" name="style[]">Name only<br />
<input type="checkbox" value="NamePictures" name="style[]">Name and Pictures<br />
<BR>Anything else included:<br />
<input type="checkbox" value="Headers" name="extra[]">Headers<br />
<input type="checkbox" value="CustomLinks" name="extra[]">Custom Links<br />
<input type="checkbox" value="Topfriends" name="extra[]">Custom Top Friends<br />
<input type="checkbox" value="TopHeader" name="extra[]">Top of the page header<br />
<BR>Details:<BR><textarea rows="5" cols="20" name="details"wrap="physical"></textarea><br />
<small>Make sure you fill this out. That way I can know what pictures to add, text to add and if you want any specific things.
If ordering anything extra, make sure to include header names (up to 10) link names and urls, top friends pictures, and images for the top of the page header</small><BR>
<BR>Payment:<br />
<input type="checkbox" value="Name" name="payment[]">Check<br />
<input type="checkbox" value="NamePictures" name="payment[]">Money Order<br />
<input type="checkbox" value="Name" name="payment[]">Cash<br />
<BR><input type="submit" value="submit" name="submit">
</form>
I actually got this code from some php tutorials (it was free to edit and use). How to I fix the $MESSAGE_BODY part?
 
uhh yeah. You aren't defining the message body.

And you should seriously look into best practices and web standards (though just a suggestions...).
 
Back
Top