I WANT THE FOLLOWING FORM'S RESULTS TO COME TO MY EMAIL ADDRESS!
I HAVE NO IDEA HOW TO MAKE THE FORM FUNCTION. Could someone please guide me through ?

<table width="681" border="1">
<tr>
<td width="164"><span class="style11">Ebay Item Number : </span></td>
<td width="420"><div align="left">
<input name="item" type="text" id="item" size="60">
</div></td>
</tr>
<tr>
<td><span class="style11">Purchase Date :</span></td>
<td><div align="left">
<input name="pdate" type="text" id="pdate" size="60">
</div></td>
</tr>
<tr>
<td><span class="style11">Payment Method : </span></td>
<td><div align="left">
<select name="pmethod" id="pmethod">
<option>Pay Pal</option>
<option>Cheque</option>
<option>Postal Order</option>
<option>Cash</option>
<option>Bank Transfer</option>
</select>
</div></td>
</tr>
<tr>
<td><span class="style11">Brief Payment Detail :</span></td>
<td><div align="left">
<input name="pdetail" type="text" id="pdetail" size="60">
</div></td>
</tr>
<tr>
<td><span class="style11">Full Name </span></td>
<td><div align="left">
<input name="fullname" type="text" id="fullname" size="60">
</div></td>
</tr>
<tr>
<td><span class="style11">Full Postal Address </span></td>
<td><div align="left">
<input name="address" type="text" id="address" size="70">
</div></td>
</tr>
<tr>
<td><span class="style11">What do you feel about our service? </span></td>
<td><div align="left"><span class="style12">
<select name="service" id="service">
<option>Coperative</option>
<option>Uncoperative</option>
</select>
</span></div></td>
</tr>
<tr>
<td valign="top"><span class="style11">Comments: </span></td>
<td valign="top"><p>
<textarea name="service" cols="70" rows="5" id="service"></textarea>
</p>
<p>&nbsp;</p>
<p>&nbsp;
</p>
<p align="right"> &nbsp;<label>
<input type="submit" name="Submit" value="Submit">
</label></p></td>
</tr>
</table>

Hey Bling, here is some very simple code that will take whatever form you POST to it, and email the results to you.

If you don't know, the lines beginning with # are comments. Modify and uncomment the last line if you want to redirect to a page after the email is sent. Otherwise, your user will submit the form then stare at a blank page! :p

Copy & paste the code below into a new document and name is something like formemail.php. Whatever you name it, set your form's action attribute to this file. You'll need to look through the code and change the parts applicable to your name, email address, email subject, yada, yada.

For this to work, your host must allow PHP mailer to work. If they don't, most likely they offer some other component or something to facilitate sending mail.

<?php

$MailBody = "<table border=\"1\" cellpadding=\"5\" cellspacing=\"2\">\n";
foreach ($_POST as $key => $value) {
	$MailBody .= "<tr><td align=right NOWRAP>".$key.
		":</td><td>".$value."</td></tr>\n";
}
$MailBody .= "</table>\n";

$headers  = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: johndoe@mydomain.com\r\n";
#$headers .= "Bcc: somebody@aol.com\r\n";
$headers .= "Reply-To: johndoe@mydomain.com\r\n";

mail("me@mydomain.com","The Email Subject",$MailBody,$headers);

#header("Location: thankyou.htm");

?>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.