Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2003

    How to make a form with send to email

    Can anyone tell me how to make my already created form mail to my email? I am interested in learning php, but I think I have to know this first...

    I feel like a newb.

  2. #2
    This script should help you get started. It is a single script that handles both the intake and processing of the data. Save it as whatever.php. Of course, you may want to add error checking, etc., but that's a different issue.

    PHP Code:


    if ($_POST['form']) { //process the data

    $from $_POST['name'].' <'.$_POST['email'].'>';
    mail ("[email protected]",$subject$message"From: $from");


    Thank you for contacting us -- we will get in touch with you shortly!


    } else { //get the data


    <form method="POST">
        <input type="hidden" name="form" value="1"><br>
        Name: <input type="text" name="name" size="50"><br>
        Email: <input type="text" name="email" size="50"><br>
        Subject: <input type="text" name="subject" size="50"><br>
        <textarea name="message" rows="20" cols="50"></textarea><br>
        <button type="submit" name="submit">Send Message</button>

    <?php //end ?>


  3. #3
    Join Date
    Feb 2004
    Hi CPQIS,

    This site will help you a lot to learn php

    Don't worry " A beginner is always a winner".



  4. #4
    Join Date
    Sep 2001
    Download and use free version of FCSS

    You only need to create form
    Eugene, developer, owner - Smart PHP Database/Template engine - PHP Hosting with Support

  5. #5
    hello Brightadmin it is the niecest line i heard in that weak
    Don't worry " A beginner is always a winner".

    it give me a very big push as i have a big problem with learning PHP
    can you help me more

  6. #6
    You also need some sort of a MTA to send mail. Such as sendmail, qmail, and courier.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts