Jump to content
xisto Community
Benz1435

Mail Form (php) This is a great email form script.

Recommended Posts

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

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
Guest
This topic is now closed to further replies.

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.