+ Reply to Thread
Results 1 to 2 of 2

Thread: need help with CGI Email

  1. #1
    rscc23 is offline x10Hosting Member rscc23 is an unknown quantity at this point
    Join Date
    Oct 2008
    Posts
    3

    need help with CGI Email

    can anyone post a completed CGI email script that i can just fill in with my own fields.

    i've been trying for DAYS and can't get it too work, and im fed up, if anyone can help me it would be really appreciated.

  2. #2
    driveflexfuel is offline x10 Sophmore driveflexfuel is an unknown quantity at this point
    Join Date
    Jul 2008
    Posts
    159

    Re: need help with CGI Email

    Place this code in a file called send_email.php
    Code:
    <?php
    $names = strip_tags($_POST["names"]);
    $emails = strip_tags($_POST["e-mails"]);
    $phones = strip_tags($_POST["phones"]);
    $methods = strip_tags($_POST["methods"]);
    $comment = strip_tags($_POST["comment"]);
    
    $message = "<html><body>";
    $message .= "$names<br>";
    $message .= "Email: $emails<br>";
    $message .= "Phone: $phones<br>";
    $message .= "Contact Method: $methods<br />";
    $message .= "Message: <br /><hr />$comment";
    $message .= "</body></html>";
    
    //this email is the email that shows up in the from collumn in the email
    $headers = "From: Web Page Email <information@domain.com>\r\n";
    $headers .= 'Content-type: text/html; charset=utf-8';
    
    //this email is where the form is sent
    mail("Customer Service <info@driveflexfuel.com>","Customer Questions",$message,$headers);
    ?>
    
    Your question or comment has been sent.<br /> 
    We will return your message as soon as posible.<br /> 
    Most receive a message within 12 hours. <br />
    Thank you for visiting www.abcdefg.com. <br />
    Place this form in a page of your choice.

    Code:
    <form action="send_email.php" method="post">
    <table border="0" cellpadding="3" cellspacing="2" align="center">
    
    <tr>
    <td align="right">Name:</td>
    <td>
    <input name="names" type="text" id="names" size="35" maxlength="80">
    </td>
    </tr>
    
    <tr>
    <td align="right">E-mail:</td>
    <td><input name="e-mails" type="text" id="e-mails" size="35" maxlength="80"></td>
    </tr>
    
    <tr>
    <td align="right">Phone:</td>
    <td><input name="phones" type="text" id="phones" size="35" maxlength="80"></td>
    </tr>
    
    <td valign="top" align="right">
    Prefered<br>Contact Method
    </td>
    <td>
    <select name="methods" id="methods" style="width: 237px;">
    <option>Choose One</option>
    <option>Email</option>
    <option>Phone</option>
    </select>
    </td>
    </tr>
    
    <tr>
    <td align="right" valign="top">Message:</td>
    <td>
    <textarea name="comment" cols="35" rows="6" id="comment"></textarea>
    </td>
    </tr>
    <tr>
    <td>&nbsp;</td>
    <td>
    <input type="submit" name="Submit" value="Submit Message">
    </td>
    </tr>
    </table>
    </form>
    if you have any questions please feel free to ask
    Last edited by driveflexfuel; 11-13-2008 at 03:37 PM.

+ Reply to Thread

Similar Threads

  1. Gmail Vs. Others
    By porky101 in forum Crossfire
    Replies: 44
    Last Post: 11-05-2011, 08:14 AM
  2. Email is not working on my board.
    By infoinn in forum Free Hosting
    Replies: 1
    Last Post: 07-17-2008, 12:10 PM
  3. Comcast boucing email from stoli
    By karhukat in forum Free Hosting
    Replies: 1
    Last Post: 06-09-2008, 02:49 PM
  4. Not working email in absolut ?
    By holeepassion in forum Free Hosting
    Replies: 1
    Last Post: 03-21-2008, 10:23 AM
  5. email settings - still having problem
    By Burnjob in forum Free Hosting
    Replies: 11
    Last Post: 10-21-2007, 07:56 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers