Php mail form

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • thelostfaith@gmail.com

    Php mail form

    I've been delving into php for the past two months, and gotten pretty
    good at writing variables and such noonsense.

    I was looking to make a mailing form for my website, instead of using
    the crappy mailto:isuck@op hp.com stuff.

    Anyone have any ideas as to where I might find this?


    I'm looking more for something that is as beginner as possible, so that
    I may customize it as I become more accustomed to the language.

  • Erwin Moller

    #2
    Re: Php mail form

    thelostfaith@gm ail.com wrote:
    [color=blue]
    > I've been delving into php for the past two months, and gotten pretty
    > good at writing variables and such noonsense.
    >
    > I was looking to make a mailing form for my website, instead of using
    > the crappy mailto:isuck@op hp.com stuff.
    >
    > Anyone have any ideas as to where I might find this?
    >
    >
    > I'm looking more for something that is as beginner as possible, so that
    > I may customize it as I become more accustomed to the language.[/color]

    Hi,

    www.php.net is your friend.
    go to there and search for mail.

    Regards,
    Erwin Moller

    Comment

    • Smitro

      #3
      Re: Php mail form

      thelostfaith@gm ail.com wrote:[color=blue]
      > I've been delving into php for the past two months, and gotten pretty
      > good at writing variables and such noonsense.
      >
      > I was looking to make a mailing form for my website, instead of using
      > the crappy mailto:isuck@op hp.com stuff.
      >
      > Anyone have any ideas as to where I might find this?
      >
      >
      > I'm looking more for something that is as beginner as possible, so that
      > I may customize it as I become more accustomed to the language.
      >[/color]

      Hey,

      I can understand that the php site is a little
      hard to understand to newbies. So a sat down a
      wrote this script for you, just to prove how easy
      it is. I googled, but all the tutorials looked
      real hard, so I thought easier to learn the easier
      way.

      Have a play with this and let us know how you go.

      <html>
      <head>
      <title>Send Me An Email</title>
      <head>
      <body>
      <?php
      if (empty($_POST['submit'])) {

      echo "<H3>Send Mail</H3>\n";

      echo "Fill in the Form and it will send you an
      email.<br>\n";
      echo "<form method=post
      action='".$_SER VER['PHP_SELF']."'>\n";
      echo "Subject: <input type='text'
      name='subject'> <BR>\n";
      echo "Message: <br><textarea name='message'
      rows='5' cols='20'>Enter your message
      here.</textarea><br>";
      echo "<center><i nput type='submit' name='submit'
      value='Send'></center></form>";

      }ELSE{

      // format and send email.
      $to = "you@youris p";
      $subject = $_POST['subject'];
      $message = $_POST['message'];

      mail ($to, $subject, $message);

      echo "Mail Sent!";
      }
      ?>
      </body>
      </html>

      Comment

      Working...