Since I am giving , giving soul.. heres some old effective code I wrote:
my MAIN page w/php:
html wrote:<form name="webcontact" method="post" action="email.php" onsubmit="javascript:if(confirm('All infomation stated on this page is correct? Are you are you wish to continue?')) document.joinform.submit(); else return false;"><input type="hidden" name="sent" value="1"><input type="hidden" name="ip" value="<?=$_SERVER['REMOTE_ADDR']?>"><table width="500" border="0" align="center" cellpadding="10" cellspacing="0" bgcolor="#FFFFFF"> <tr> <th colspan="2" bgcolor="#333333" class="style16" scope="col">Website Design and Development Inquiry Form </th> </tr> <tr> <th align="right" class="style8" scope="col">Name<span class="style18">*</span>:</th> <th align="left" bgcolor="#fafafa" scope="col"><input name="name" type="text" id="name" /></th> </tr> <tr> <th align="right" bgcolor="#eaeaea" class="style8" scope="col">Email Address<span class="style18">*</span>: </th> <th align="left" bgcolor="#eaeaea" scope="col"><input name="email" type="text" id="email" /></th> </tr> <tr> <th align="right" class="style8" scope="col">Phone Number: </th> <th align="left" bgcolor="#fafafa" scope="col"><input name="phone" type="text" id="phone" /></th> </tr> <tr> <th align="right" bgcolor="#eaeaea" class="style8" scope="col">Type Of Service<span class="style18">*</span>: </th> <th align="left" bgcolor="#eaeaea" scope="col"><select name="service"> <option value="WebsiteReface">Website Re-Facing</option> <option value="Website Design">Website Design and Development</option> <option value="Other">Other</option> </select></th> </tr> <tr> <th align="right" valign="top" class="style8" scope="col">Message<span class="style18">*</span>:<br /> <span class="style17">( if you choose OTHER for services. Please describe your choice in here )</span> </th> <th align="left" bgcolor="#fafafa" scope="col"><textarea name="message" cols="30" rows="10" id="message"></textarea></th> </tr> <tr> <th colspan="2" bgcolor="#eaeaea" scope="col"><input name="Submit" type="submit" id="Submit" value="Send Inquiry" /> <input name="Reset" type="reset" id="Reset" value="Reset" /> <br /> <span class="style18">*</span> <span class="style8">- Required Fields </span></th> </tr></table></form>
my php mail page (Email.php):
Quote »<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
http://www.w3.org/TR/html4/loose.dtd">< ... title>Sent Successfully!</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head>
<body><?$body = "GeomanStudios WebContact from $name\n\n\n**********************************\n\nThis is a $service Submittion\n\n**********************************\n\n\n\n***********************\n\nCONTACT INFORMATION\n\n***********************\n\nName: $name\n\nEmail: $email\n\nHome Phone #: $phone\n\nService: $service\n\nMessage: $message\n\n";
$sendmail = mail("
[email protected]", "GeoManStudios WebContact $name - $service", $body, "From: Contact Us Form Submission from $name\r\nCc: ***@whatever.com\r\n");
if ($sendmail) { echo "<center>Received successfully";} else { echo "<center>There seems to be a problem. Please try again later</center>";}?><center>Please<font color="black" face="arial" size="2"> Click Here to return to your main page. A representative will be contacting you shortly. THANKS!</center></body></html>[/quote]