Benz1435 0 Report post Posted March 5, 2005 save this page as formmail.php Code: <?php $MailTo = "your email"; $MailSubject = "contact"; $MailHeader = "From: $s1"; $MailSent = "Put here the information you want to be shown after the message is sent."; if ($s1 == ""){ echo "You did not put your <i>name</i>."; } else { $MailBody = "Name : $s1\n"; } if ($s2 == ""){ echo "You did not put your <i>E-Mail</i>."; } else { $MailBody .= "Email : $s2\n"; } if ($s3 == ""){ } else { $MailBody .= "Message : $s3\n"; } { mail($MailTo, $MailSubject, $MailBody, $MailHeader); echo("$MailSent"); } ?> ------------------ save this page as contact.php Code: <u> Contact Form</u><br><form name="form1" method="post" action="formmail.php"> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="250" id="AutoNumber1" height="200"> <tr> <td width="111" height="25"> <b><font size="2" color="#FFFFFF" face="Arial">Name: <input type="text" name="s1" size="20" style="font-family: Arial; font-size: 8pt; color="#FFFFFF" tabindex="1"></font></b></td> </tr> <tr> <td width="111" height="25"> <b><font size="2" color="#FFFFFF" face="Arial">E-mail: <input type="text" name="s2" size="20" style="font-family: Arial; font-size: 8pt; color="#FFFFFF" tabindex="3"></font></b></td> <tr> <td width="111" height="23"> <b><font size="2" color="#FFFFFF" face="Arial">Message:<br> <textarea rows="4" name="s2" cols="50" style="font-size: 8pt; color="#FFFFFF" ; font-family: Arial" tabindex="7">Type Your Message Here. Remember to put your image url, your site name, and your name.</textarea></font></b></td></tr> </table> <font face="Arial" style="font-size: 8pt"> <input type="submit" value="Send Message" name="send" style="font-family: Arial; font-size: 8pt; color="#FFFFFF" > <input type="reset" value="Reset Form" name="reset" style="font-family: Arial; font-size: 8pt; color="#FFFFFF" ></font> </form> Share this post Link to post Share on other sites
shadow skazi 0 Report post Posted March 6, 2005 This would seem useful as a "Have a question?" or customer support page.Good work! Share this post Link to post Share on other sites
ashton 0 Report post Posted June 27, 2005 I already have a mail form but I am not sure if I like it that much. Using this mail form would I be able to make more than one form off of the page formmail.php? Share this post Link to post Share on other sites
snlildude87 0 Report post Posted June 27, 2005 Please don't revive old topics.If you want a form mail, get it here: http://forums.xisto.com/topic/20516-email-scriptform-with-php-how-to-make-a-simple-email-script-using-php/Post all your questions there. Share this post Link to post Share on other sites