Adblock breaks this site

Anyone great with PHP? Need assist for a Contact Form!

Discussion in 'Web Programming' started by Nil Volentibus Arduum, Apr 24, 2011.

Thread Status:
Not open for further replies.
  1. Nil Volentibus Arduum

    Nil Volentibus Arduum Forum Addict
    Banned

    Joined:
    Jun 14, 2010
    Posts:
    377
    Referrals:
    0
    Sythe Gold:
    0
    Anyone great with PHP? Need assist for a Contact Form!

    Thread been gravedug, it's from April. Thanks anyways!
     
  2. uzn33dhelp

    uzn33dhelp Forum Addict

    Joined:
    May 19, 2008
    Posts:
    458
    Referrals:
    0
    Sythe Gold:
    0
    Anyone great with PHP? Need assist for a Contact Form!

    I have added you. Can definitely help you out with this!
     
  3. Massive MK

    Massive MK Active Member

    Joined:
    May 23, 2011
    Posts:
    130
    Referrals:
    0
    Sythe Gold:
    0
    Anyone great with PHP? Need assist for a Contact Form!

    stilll need help?
     
  4. World Domination

    World Domination Guru
    Banned

    Joined:
    Apr 9, 2007
    Posts:
    1,563
    Referrals:
    3
    Sythe Gold:
    5
    Anyone great with PHP? Need assist for a Contact Form!

    Something like this:?

    HTML:
    Code:
    <form method="POST" action="contactform.php">
       <p>
         <input name="name" type="text" value="Your Name" size="19">
         <br>
          <br>
          <input name="email" type="text" value="Your Email" size="19">
      </p>
       <p>
       <!Feel free to change these options to whatever you would like them to say.>
         <select  size="1"  name="subject" id="subject">
    <option>Business</option>
    <option>Site Issue</option>
    <option>Personal</option>
    <option>Other</option>
    </select>
         <br>
          <br>
           <textarea rows="9" name="message" cols="30"></textarea>
          <br>
          <br>
          <input type="submit" value="Submit" name="submit">
          </p>
      
    </form>
    </center>
    </body>
    </html>
    PHP:
    PHP:
    <?php
    if(isset($_POST['submit'])) {

    $to "YOUR EMAIL ADDRESS";
    $subject $_POST['subject'];
    $name_field $_POST['name'];
    $email_field $_POST['email'];
    $message $_POST['message'];
     
    $body "From: $name_field\n E-Mail: $email_field\n Message:\n $message";
     
    echo 
    "Message has been submitted to $to";
    mail($to$subject$body);

    } else {

    echo 
    "Email not sent, please go back and try again.";

    }
    ?>
    Save them as contactpage.html and contactpage.php.
     
  5. Nil Volentibus Arduum

    Nil Volentibus Arduum Forum Addict
    Banned

    Joined:
    Jun 14, 2010
    Posts:
    377
    Referrals:
    0
    Sythe Gold:
    0
    Anyone great with PHP? Need assist for a Contact Form!

    Thread is from April, uzn33dhelp had already helped me out with this. Thanks alot for the help anyhow, I'm sure it'd be of great use when I needed it!
     
< knock Em Booter|Cheap| Hits Amazingly Hard| Perfect for XBL and Home| | [Free] Website development [Free] >
Thread Status:
Not open for further replies.


 
 
Adblock breaks this site