Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    Aug 2006
    Posts
    4
    Member #
    13774
    Ok I am making a website for a resturant and anyways I want a place where you can submit comments like here http://www.junglejims.ca/comments.php and receive them if anyone could help me that be great!! I am using Frontpage to make it

    Trev

  2.  

  3. #2
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,720
    Member #
    5580
    Liked
    718 times
    You'll need a PHP script to actually send the email to you.

    You should test your PHP sendmail by copying the code below into Notepad.

    1) Enter your email address in the line that says
    ## Enter your email address here:
    $recipient = "yourname@aol.com";

    2) save-as "mailtest.php"

    3) Upload into your regular HTML directory.

    4) Go to that webpage, mailtest.php
    It will send a test email to the email address you put in that line.

    5) Check your email to see if it's there.
    You should have an email from JohnSmith@aol.com

    ======================================

    If your PHP sendmail is working, you can then utilitize PHP for sending the form.

    Copy the form from junglejim and paste it into your webpage.

    Then, let us know ... we can provide the script you need for the form.

    It's just important to know if your PHP sendmail works before you do all that.

    ============================

    Here's the PHP script to test sendmail:

    PHP Code:
    <?
    #mailtest.php  ... test your PHP sendmail

    ## Enter your email address here:
    $recipient "yourname@aol.com";

    $subject "Information from my Form";
    $email "JohnSmith@aol.com";
    $contact_Name "John Smith";
    $toaddr "$recipient";
    $subject "$subject";
    $senddate = (date("d M Y h:m:s -0500"));

    $message "

    Contact Information
    Online Form: 
    $senddate
    ---------------------------------------------------

    From: 
    $contact_Name
    Email: 
    $email

    Message
    ---------------------------------------------------
    This is a test ...
    ---------------------------------------------------
    "
    ;
    $extraheaders "From: $email\nReply-To: $email\n\n";

    if (! 
    mail($toaddr$subject$message$extraheaders))
      echo 
    "Mail did not send for some reason.";

    echo 
    "mail sent ... see your incoming email.";

    ?>


  4. #3
    Junior Member
    Join Date
    Aug 2006
    Posts
    4
    Member #
    13774
    Thanks!! Ill fiddle with it see what I can get

  5. #4
    Junior Member
    Join Date
    Aug 2006
    Posts
    4
    Member #
    13774
    Ok I got that working how do I use the jungle jims form into that now

  6. #5
    Junior Member
    Join Date
    Aug 2006
    Posts
    4
    Member #
    13774
    http://www.pjsbarandgrill.ca/test.htm thats the form there Ill pretty it up after its working lol

  7. #6
    Junior Member
    Join Date
    Sep 2006
    Location
    UK
    Posts
    29
    Member #
    13854
    The code below is the basic mail-form handler that I wrote for my website. You need to put this code into its own PHP file, and set the mail form to POST the form data to this file. Remember to change the $mailto value, as this is the address that the form will be sent to. You should also customise the $mailbody variable, as it looks for POSTed fields with the IDs name, email, tel, and body. If you have any questions then let me know and I'll do my best to answer them.

    PHP Code:
    <?php
    # PHP script to collect form data and send an e-mail

    $email $HTTP_POST_VARS[email];
    $mailto "your@email-address-here.com";
    $mailsubj "Form submission from my website";
    $mailhead "From: $email\n";
    reset ($HTTP_POST_VARS);

    $mailbody "Name: $HTTP_POST_VARS[name]\n" .
      
    "E-mail: $HTTP_POST_VARS[email]\n" .
      
    "Tel: $HTTP_POST_VARS[tel]\n" .
      
    "Message: $HTTP_POST_VARS[body]";

    if (!
    eregi("\n",$HTTP_POST_VARS[email]) && eregi("@",$HTTP_POST_VARS[email])) {
      
    mail($mailto$mailsubj$mailbody$mailhead);
      echo 
    "<p>Thank you - your e-mail has been sent.</p>";
    } else {
      echo 
    "<p>Please enter a valid e-mail address.</p>";
    }
    ?>


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 03:08 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com