GFXVoid Graphic Design Forum

Remove Text Formatting
Loading...

» Online Users: 2,937

0 members and 2,937 guests
No Members online

» Site Navigation

 > FAQ

» Stats

Members: 35,442
Threads: 103,075
Posts: 826,688
Top Poster: cc.RadillacVIII (7,429)
Welcome to our newest member, Lekelindids
Results 1 to 2 of 2

Thread: PHP Mailer

  1. #1
    Join Date
    Jun 2006
    Location
    Prestonsburg, Kentucky
    Posts
    133

    Default

    Ok, you will need to save this as "form.html"

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    ****** "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <title>Form Mailer : Powered By ThatTechPlace</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    <body>
    <form action="mailer.php" method="post">
    **<font size="1" face="Arial, Helvetica, sans-serif">Your Name: 
    **<input type="text" name="test">
    **<br>
    **Your Email: 
    **<input type="text" name="email">
    **<br>
    **Your Message:</font><br>
    ** <textarea name="message" rows="5" cols="30"></textarea><br>
    <input type="submit" name="submit" value="Submit">
    **<br>
    **<font size="2" face="Arial, Helvetica, sans-serif">Before submitting please</font> 
    **<input type="button" value="Print This Page" onMouseOver="window.print()" />
    
    </form>
    <font size="-7" face="Arial, Helvetica, sans-serif">Powered by <a href="http://www.thattechplace.com">ThatTechPlace</a><br>
    Do not remove this copyright without my permission. 
    </font>
    </body>
    </html>
    Ok, now here is the actual form. Put this before any HTML.

    Code:
    <?PHP 
    //**************************************************
    //*****Script By Colton Wills of ThatTechPlace******
    //*****Please Do not edit without my permission*****
    //**************************************************
    
    //Configure these to your settings.
    $to = "ADD YOUR EMAIL HERE"; //Thats obvious 
    $subject = "Results from your Request Info form"; //Add your subject
    $headers = "From: Form Mailer"; //Add your headers
    $forward = 0; // Auto-Responder, Configurable at the main bottom. 0 = no, 1 = yes
    $location = ""; //Dont configure
    
    $date = date ("l, F jS, Y"); //PHP Time-Date format Dont configure
    $time = date ("h:i A");**//Dont configure
    
    
    // DONT CONFIGURE BELOW THIS LINE 
    $msg = "Below is the result of your feedback form. It was submitted on $date at $time.\n\n"; 
    
    if ($_SERVER['REQUEST_METHOD'] == "POST") {
    ****foreach ($_POST as $key => $value) { 
    ********$msg .= ucfirst ($key) ." : ". $value . "\n"; 
    ****}
    }
    else {
    ****foreach ($_GET as $key => $value) { 
    ********$msg .= ucfirst ($key) ." : ". $value . "\n"; 
    ****}
    }
    
    mail($to, $subject, $msg, $headers); 
    if ($forward == 1) { 
    ****header ("Location:$location"); 
    } 
    else { 
    ****echo "Thank your for submitting this form. We will get back to you A.S.A.P"; //Auto-Reply
    } 
    //Script by Colton Wills of ThatTechPlace
    ?>

  2. #2
    Join Date
    Apr 2005
    Posts
    23

    Default

    I'm new to Php Scripting, been doing Html for a few months.
    but ill try this one tomorrow when i wake up

    btw, wouldnt it be nice to have a example?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Powered by vBadvanced CMPS v4.1.1