Adblock breaks this site

[PHP] Contact form

Discussion in 'Web Programming' started by Fagex_SantaClaus, Sep 19, 2007.

  1. Fagex_SantaClaus

    Fagex_SantaClaus Guest

    Referrals:
    0
    [PHP] Contact form

    create a .php file with this code and your modifications.
    call it email.php for example:

    PHP:
    <?php
    if (($name) && ($mail) && ($subject) && ($message) && ($submit)) {
    $youremail "[email protected]";
    mail($youremail,$subject,$message,"From: $mailrnReply-To: $mailrn");
    echo 
    "E-Mail was sent correctly
    "
    ;
    }
    ?>


    this is the form. you should paste this code in the place you wish over your page.
    PHP:
    <form method="post"
    action="email.php"><br>
    <
    input type="text" name="NAME"
    value="Your name"><br><br>
    <
    input type="text" name="EMAIL"
    value="Your e-mail"><br><br>
    <
    input type="text" name="SUBJECT"
    value="The subject"><br><br>
    <
    input type="text" name="MESSAGE"
    value="Message"><br><br>
    <
    input type="submit" value="Send"
    name="submit" style="font-family: Trebuchet MS"><br>
    </
    form>
    It does not give the email address of the sender.
     
  2. speedster239

    speedster239 Forum Addict
    Java Programmers

    Joined:
    Jan 21, 2007
    Posts:
    313
    Referrals:
    0
    Sythe Gold:
    0
    [PHP] Contact form

    It's good but not solid. Your bettter off forwarding to more than one address and saving all of the info to a database also.
     
< giving some one 2 runescape accounts if you do a job for me | [Perl + vB Related] >


 
 
Adblock breaks this site