Web Hosting Reviews for Affiliate Marketers

Unlimited Shared hosting & Unlimited Disk Space from $5.95 - Dreamhost
Solid Managed VPS with 4 IP's from $60 - Liquid Web
Lightning Fast Dedicated Servers & 1GB RAM from $149 - Liquid Web
#1 Domain Registration with WHOIS Privacy - Just $9.95

This Dreamhost support thread was started by ijpoole on 2009-10-12 14:46:21:

Post Reply? I have an HTML form that I would like to output to email via PHP. However, the PHP page does not seem to be picking up the values from the HTML form; thus they do not display in the email or on the response web page. Any idea what’s wrong? The form is below. <FORM METHOD=”POST” ACTION=”testform.php” > <TABLE> <TR> <TD width=”190″><font size=”2″ face=”Verdana, Arial, Helvetica, sans-serif”>First Name</font> <input type=”text” name=”fname” size=”15″></TD> <td width=”265″ style=”margin-left:5px”><font size=”2″ face=”Verdana, Arial, Helvetica, sans-serif”>Last Name</font>  <input type=”text” name=”lname” size=”25″ /></td> </TR> </TABLE> <table> <TR> <TD width=”460″><font size=”2″ face=”Verdana, Arial, Helvetica, sans-serif”>Email Address</font>  <input type=”text” name=”email_add” size=”50″></TD> </TR> </table> <table> <TR> <TD width=”55″><input type=”reset” value=”Reset” name=”Reset”></TD> <TD width=”400″ align=”right”><input type=”submit” value=”Submit” name=”Submit”></TD> </TR> </TABLE> </FORM> That form should send data to testform.php: <?php // get posted data into local variables $email_add = $_POST['email_add'] ; $EmailTo = “computerquery@ijpoole.net”; $Subject = “Testform PHP Test”; $fname = $_POST['fname'] ; $lname = $_POST['lname'] ; $headers = “From: $email_add”; $body = “”; $body .= “You have received an order from:”; $body .= “nn”; $body .= $fname; $body .= ” “; $body .= $lname; $body .= “n”; $success = mail($EmailTo, $Subject, $body, “From: <$email_add>”); echo $fname . ” ” .$lname . “<br />” ; echo “Your email test completed successfully.” ; ?> What has happened most of the time is that I will get a blank email; even the “from” information (”email_add”) is missing. I’m a newbie to PHP so I’m sure I’m doing something ignorant here. Thanks for your help.

Join in on the original post at the Dreamhost Forum, Get a Dreamhost Plan or view our Dream Host Review.

Related Web Host Reviews


Close
E-mail It