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 8 of 8
  1. #1
    Junior Member
    Join Date
    Jun 2007
    Location
    Cairns, Australia
    Posts
    6
    Member #
    15347
    Hi guys, I'm very new with HTML coding and sometimes I find very frustrating not knowing where the error is, maybe you can help. I have these two online forms, and one works and the other doesn't. The one that works is http://www.cairnsunlimited.com/about_us.htm and it send us the details in an emal when a reader clicks submit. To create the other one I just copied the code, but for some reason it doesn't generate an email http://www.cairnsunlimited.com/kurandahoneyhouse.htm

    Would anybody help me find where the error is? I'm going crazy trying to find it out. Thanks a lot for your help, much appreciated.

    Maria

  2.  

  3. #2
    Senior Member karinne's Avatar
    Join Date
    Dec 2003
    Location
    Aylmer QC Canada
    Posts
    1,607
    Member #
    4335
    Liked
    8 times
    We'll need to see the about_us.php and the kurandahoneyhouse.php pages

    and please put a proper DOCTYPE ... something Strict is preferable.

    And validate your code!
    [a web design portfolio - Currently NOT AVAILABLE for work | web design | Re-coding | PSD-to-HTML]
    I'm also on: virb - facebook - twitter - flickr - del.icio.us

  4. #3
    Junior Member
    Join Date
    Jun 2007
    Location
    Cairns, Australia
    Posts
    6
    Member #
    15347
    Hi Karinne, as I said I'm very new and don't know what you mean with DOCTYPE or validate my code.
    The php pages are www.cairnsunlimited.com/about_us.php and www.cairnsunlimited.com/kurandahoneyhouse.php
    All I know is that one form works fine and the other one doesn't work. thanks a lot for your help,
    Maria
    Quote Originally Posted by karinne
    We'll need to see the about_us.php and the kurandahoneyhouse.php pages

    and please put a proper DOCTYPE ... something Strict is preferable.

    And validate your code!

  5. #4
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,733
    Member #
    5580
    Liked
    718 times
    The two links you gave us are both the "thankyou page", or there are
    other problems with your pages. We of course can't see the actual PHP scripting,
    just the HTML output from the script.

    I mean show us the contents of this file:
    kurandahoneyhouse.php

    We need to see that PHP script.


    .


  6. #5
    Junior Member
    Join Date
    Jun 2007
    Location
    Cairns, Australia
    Posts
    6
    Member #
    15347
    Sorry, I didn't realize that you weren't able to view the whole code for the PHO pages above. I will attach it below.
    I went to validate my code, but there were many, many, many so-called errors. The thing is that the form on this page http://www.cairnsunlimited.com/about_us.htm works
    but the form on this page http://www.cairnsunlimited.com/kurandahoneyhouse.htm does not work. When I say 'works' I mean generates an email.
    I can't see any differences between the two pages, so it can't be a problem with doctype or validating code.

    Here are the two PHP pages, first the one that works:
    -----------------------------------------------------------------------
    <LINK REL=stylesheet HREF="mystylesheetFF.css" TYPE="text/css">
    <!--[if IE]><style type="text/css">@import "mystylesheet.css";</style><![endif]-->
    <script src="pngfix.js" type="text/javascript"></script>
    <title>Cairns Unlimited - ABOUT US!</title>
    <META NAME="description" CONTENT="Everything you need to know about Cairns, the Great Barrier Reef, and Tropical North Queensland... from the Whitsunday Islands to Cape York Peninsula, and the great Northern Outback.">
    <META NAME="keywords" CONTENT="accommodation airlie atherton attractions backpackers barrier beach bed breakfast cairns campgrounds cape caravan carpenteria cars competitions cooktown cruises diving farmstays golf great hostels hotels information isa karumba lodging motels mount north outback parks peninsula prize queensland reef rental resorts river snorkelling tablelands tours transport tropical unlimited vacation whitsundays york">
    <META NAME="GOOGLEBOT" CONTENT="INDEX, FOLLOW">
    <meta name="ROBOTS" content="ALL">
    <meta name="distribution" content="global">
    <div id="content">

    <div id="logo"><div id="orange" style="margin-top: 110px;"><a href="about_us.htm">BACK</a></div>
    </div>
    <div id="titletext">FEEDBACK/ENQUIRY</div>
    <div id="directions"></div>
    <div id="rightcolumn" style="text-align: justify;">Cairns Unlimited is the only true up-to-date "one stop shop" for everything about Cairns and Tropical North Queensland, from Airlie Beach and the Whitsundays to Cooktown and Cape York Peninsula, from the Atherton Tablelands to the Outback, as far west as Mount Isa and Karumba, in the Gulf of Carpentaria. This is the only site you will need to plan your Tropical North Queensland vacation; accommodation, hotels, motels, resorts, backpackers hostels, bed and breakfast lodging, farmstays, caravan parks and campgrounds. You will find all the latest information and the best deals on attractions, tours, river cruises, and diving and snorkelling on the Great Barrier Reef, transport options and rental cars.</div>
    <div id="endlessfirst" style="height: 500px; overflow: auto;">

    <?
    $first_name = $_POST['first_name'];
    $surname = $_POST['surname'];
    $email = $_POST['email'];
    $competition = $_POST['competition'];
    $mailing_list = $_POST['mailing_list'];
    $enquiry = $_POST['enquiry'];
    $heardsearch = $_POST['heardsearch'];
    $search = $_POST['search'];
    $heardweblink = $_POST['heardweblink'];
    $weblink = $_POST['weblink'];
    $heardnewspaper = $_POST['heardnewspaper'];
    $newspaper = $_POST['newspaper'];
    $heardother = $_POST['heardother'];
    $other = $_POST['other'];

    PRINT "<TABLE border=0 width=600 align=center cellspacing=0 cellpadding=0 style='font: normal 12px arial;'>";
    PRINT "<TR><TD>";
    PRINT "G'day $first_name $surname! Thanks for submitting your feedback or enquiry to Cairns Unlimited.
    <br>
    <h4><i>$enquiry</i></h4>
    In the form, you said that you heard about Cairns Unlimited from - <br>
    <table border='0' width='100%' style='font: normal 12px arial;'>
    <tr>
    <td>
    $heardsearch $search
    </td>
    </tr>
    <tr>
    <td>$heardweblink$weblink<!--R2C1-->
    </td>
    </tr>
    <tr>
    <td>
    $heardnewspaper$newspaper
    </td>
    </tr>
    <tr>
    <td>
    $other
    </td>
    </tr>
    </table>
    <br>
    $competition <br><br>
    $mailing_list
    <br>
    <br>
    Thanks again,<br>
    The Cairns Unlimited team
    ";
    PRINT "</FONT></TD></TR></TABLE></center>";
    mail("$email", "Thanks for your feedback or enqiry", "G'day $first_name $surname,\n\nThanks again for submitting an enquiry or giving us your feedback.\nWe appreciate you taking the time to help us make Cairns Unlimited the best it can be.\n$competition\n$mailing_list\nThank you once again,\nThe Cairns Unlimited team.", "From: info@cairnsunlimited.com\n");
    mail("info@cairnsunlimited.com", "Cairns Unlimited website feedback / enquiry", "$first_name $surname has submitted the following feedback / enquiry.\n
    $enquiry\n$competition\n$mailing_list$email\n", "From: $email\n");
    ?>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    </div></div>
    -------------------------------------------------------------------------------

    <LINK REL=stylesheet HREF="mystylesheetFF.css" TYPE="text/css">
    <!--[if IE]><style type="text/css">@import "mystylesheet.css";</style><![endif]-->
    <script src="pngfix.js" type="text/javascript"></script>
    <title>Honey House Kuranda!</title>
    <META NAME="description" CONTENT="Everything you need to know about Cairns, the Great Barrier Reef, and Tropical North Queensland... from the Whitsunday Islands to Cape York Peninsula, and the great Northern Outback.">
    <META NAME="keywords" CONTENT="">
    <META NAME="GOOGLEBOT" CONTENT="INDEX, FOLLOW">
    <meta name="ROBOTS" content="ALL">
    <meta name="distribution" content="global">
    <div id="content">

    <div id="logo"><div id="orange" style="margin-top: 110px;"><a href="kurandahoneyhouse.htm">BACK</a></div>
    </div>
    <div id="titletext">ORDER/ENQUIRY</div>
    <div id="directions"></div>
    <div id="rightcolumn" style="text-align: justify;"></div>
    <div id="endlessfirst" style="height: 500px; overflow: auto;">

    <?
    $first_name = $_POST['first_name'];
    $surname = $_POST['surname'];
    $email = $_POST['email'];
    $address = $_POST['address'];
    $town = $_POST['town'];
    $state = $_POST['state'];
    $postcode = $_POST['postcode'];
    $enquiry = $_POST['enquiry'];
    PRINT "<TABLE border=0 width=600 align=center cellspacing=0 cellpadding=0 style='font: normal 12px arial;'>";
    PRINT "<TR><TD>";
    PRINT "Hi $first_name $surname! Thanks for submitting your online order or enquiry to Honey House Kuranda. We will respond to your email as soon as possible.
    <br>
    ";
    PRINT "</TD></TR></TABLE>";
    mail("steve@thesavagefiles.com", "Honey House Kuranda online enquiry", "$first_name $surname has submitted the following enquiry.\n
    $enquiry\n
    $address\n$town\n$state\n$postcode\n", "From: $email\n");
    ?>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    </div></div>

  7. #6
    Junior Member
    Join Date
    Aug 2007
    Posts
    20
    Member #
    15761
    Hmm,
    Well there's nothing wrong with the line:

    mail("steve@thesavagefiles.com", "Honey House Kuranda online enquiry", "$first_name $surname has submitted the following enquiry.\n
    $enquiry\n
    $address\n$town\n$state\n$postcode\n", "From: $email\n");

    In terms of sending an email. That bits works.

    I'd recommend sanitising your post variables though.
    Maybe you are putting a dodgy character into one of those fields like $address? What error_reporting do you have on the server?


    Chris.

  8. #7
    Senior Member seanmiller's Avatar
    Join Date
    Sep 2003
    Location
    Glastonbury, UK
    Posts
    868
    Member #
    3263
    Liked
    1 times
    Well, one major difference is that you're sending to a different e-mail address... does the second one work if you send it to the same e-mail address as the first (ie. info@cairnsunlimited.com)? If so, that'd narrow down the issue to the mail transport rather than the php itself.

    Sean

  9. #8
    Junior Member
    Join Date
    Jun 2007
    Location
    Cairns, Australia
    Posts
    6
    Member #
    15347
    Hi everyone, thanks for the replies. It seems somehow that email address doesn't accept forms. At least we narrowed the problem down.
    Thanks a lot again,
    Maria


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 01:54 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com