Results 1 to 4 of 4

Thread: Mailer Expandable?

  1. #1
    Join Date
    Jan 2006
    Location
    Ft. Smith, AR
    Posts
    795
    Thanks
    57
    Thanked 129 Times in 116 Posts

    Default Mailer Expandable?

    Well, since I must give up hope on my PERL mail script... I suppose I'll give PHP another go. Could someone take a look at this simple mail script and tell me if this is even expandable? I'd like to make the data get sent to more than one recipient, and I'd also like to add more formfields to be sent with the data.

    Rather than just Name, email, and message, I'd like to expand it to be a fairly large mail script... I'd also like to add in some "bot stopper/slower downer" stuff... You know, like the "What color is the sky?" "Is fire hot or cold?" that kind of stuff, and maybe a hidden input field that returns an error if it gets filled in.

    I'd also like it to redirect to a "verification" page which displays all the input information gathered and requires confirmation before submission, then after submission, redirect to a "thank you page".

    The HTML:
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
     <HEAD>
      <TITLE> Form Tester </TITLE>
      <META NAME="Generator" CONTENT="EditPlus">
      <META NAME="Author" CONTENT="">
      <META NAME="Keywords" CONTENT="">
      <META NAME="Description" CONTENT="">
     </HEAD>
    
     <BODY>
      
    
    		<form method="post" action="sendmail.php" id="form">
    			 First Name: <input name="fname" type="text" size="30"/><br /><br />
    			 Last Name: <input name="lname" type="text" size="30"/><br /><br />
    			 Email: &nbsp; &nbsp; &nbsp; &nbsp;<input name="email" type="text" size="30"/><br /><br />
    			 Message:<br />
    			<textarea name="message" rows="4" cols="33">
    			</textarea><br /><br />
    			 <span style="float:left;"><input type="reset" value="Oops!" /></span><span style="float:middle;"><input type="submit" value="Send Message" /></span>
    		</form>
    
    
     </BODY>
    </HTML>
    The PHP:
    PHP Code:
    <?php
      $fname 
    $_REQUEST['fname'] ;
      
    $lname $_REQUEST['lname'] ;
      
    $email $_REQUEST['email'] ;
      
    $message $_REQUEST['message'] ;





      
    mail"josh_redefined@yahoo.com""Contact Page Form Submission",
        
    "$fname $lname had this to say: $message""From: $email);
      
    header"Location: http://www.Eight7Teen.com" );
    ?>

    Any ideas?
    --------------------------------------------------
    Reviews, Interviews, Tutorials, and STUFF
    --------------------------------------------------
    Home of the SexyBookmarks WordPress plugin

  2. #2
    Join Date
    Jan 2006
    Location
    Ft. Smith, AR
    Posts
    795
    Thanks
    57
    Thanked 129 Times in 116 Posts

    Default

    anybody?
    --------------------------------------------------
    Reviews, Interviews, Tutorials, and STUFF
    --------------------------------------------------
    Home of the SexyBookmarks WordPress plugin

  3. #3
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Look at the following sites about the mail headers.

    http://us3.php.net/function.mail
    http://www.htmlite.com/php029.php

    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  4. The Following User Says Thank You to thetestingsite For This Useful Post:

    TheJoshMan (08-05-2008)

  5. #4
    Join Date
    Jan 2006
    Location
    Ft. Smith, AR
    Posts
    795
    Thanks
    57
    Thanked 129 Times in 116 Posts

    Default

    PERFECT!

    Now I just have to figure out how to get he script to gather the data from more input areas (radio buttons, check boxes, select boxes, etc...) so I can have a fully functional contact form.
    --------------------------------------------------
    Reviews, Interviews, Tutorials, and STUFF
    --------------------------------------------------
    Home of the SexyBookmarks WordPress plugin

Bookmarks

Posting Permissions

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