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.
Anyone great with PHP? Need assist for a Contact Form!
  1. Unread #1 - Apr 24, 2011 at 6:20 AM
  2. Nil Volentibus Arduum
    Joined:
    Jun 14, 2010
    Posts:
    377
    Referrals:
    0
    Sythe Gold:
    0

    Nil Volentibus Arduum Forum Addict
    Banned

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

    Thread been gravedug, it's from April. Thanks anyways!
     
  3. Unread #2 - Apr 24, 2011 at 11:11 PM
  4. uzn33dhelp
    Joined:
    May 19, 2008
    Posts:
    458
    Referrals:
    0
    Sythe Gold:
    0

    uzn33dhelp Forum Addict

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

    I have added you. Can definitely help you out with this!
     
  5. Unread #3 - May 24, 2011 at 1:32 PM
  6. Massive MK
    Joined:
    May 23, 2011
    Posts:
    130
    Referrals:
    0
    Sythe Gold:
    0

    Massive MK Active Member

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

    stilll need help?
     
  7. Unread #4 - May 28, 2011 at 12:04 AM
  8. World Domination
    Joined:
    Apr 9, 2007
    Posts:
    1,563
    Referrals:
    3
    Sythe Gold:
    5

    World Domination Guru
    Banned

    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.
     
  9. Unread #5 - May 28, 2011 at 7:03 AM
  10. Nil Volentibus Arduum
    Joined:
    Jun 14, 2010
    Posts:
    377
    Referrals:
    0
    Sythe Gold:
    0

    Nil Volentibus Arduum Forum Addict
    Banned

    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] >

Users viewing this thread
1 guest
Thread Status:
Not open for further replies.


 
 
Adblock breaks this site