Problems with PHP

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • wildpianist
    New Member
    • Mar 2008
    • 2

    Problems with PHP

    Hey I hope someone can help me here. I managed to create a simple feedback form and am now using it for an online booking form. However this worked great for about 3 weeks then just stopped working.

    Here is my code

    <?php
    $odate = $_REQUEST['odate'] ;
    $otime = $_REQUEST['otime'] ;
    $npeople = $_REQUEST['npeople'] ;
    $airport = $_REQUEST['airport'] ;
    $flight = $_REQUEST['flight'] ;
    $name = $_REQUEST['name'] ;
    $address = $_REQUEST['address'] ;
    $postcode = $_REQUEST['postcode'] ;
    $phone = $_REQUEST['phone'] ;
    $mobile = $_REQUEST['mobile'] ;
    $email = $_REQUEST['email'] ;
    $rdate = $_REQUEST['rdate'] ;
    $rtime = $_REQUEST['rtime'] ;
    $rflight = $_REQUEST['rflight'] ;
    $ffrom = $_REQUEST['ffrom'] ;
    $cccard = $_REQUEST['cccard'] ;


    mail( "wildpianist@sk y.com", "Online Booking\n$odate ",
    "\nOutward Date: $odate\nOutward Time: $otime\nNumber of people: $npeople\nAirpo rt: $airport\nName of Customer: $name\nAddress: $address\nPostc ode: $postcode\nPhon e number: $phone\nMobile number: $mobile\nEmail address: $email\n\nDate of Return: $rdate\n Time of Return: $rtime\nReturni ng Flight Number: $rflight\nFlyin g From: $ffrom\nPayment Method: $cccard\n\n");
    header( "Location: http://www.airportrunn ers.com/thankyou.html" );

    ?>

    I have also made a bog standard one which seemed to work fine, but for some reason this one doesn't want to send the email to me.

    Any suggestions would be greatly appreciated

    Dave
  • Markus
    Recognized Expert Expert
    • Jun 2007
    • 6092

    #2
    "just stopped working"

    How do you mean? What does work and what doesn't work? Do you get any errors?

    Regards.

    Comment

    • wildpianist
      New Member
      • Mar 2008
      • 2

      #3
      Originally posted by markusn00b
      "just stopped working"

      How do you mean? What does work and what doesn't work? Do you get any errors?

      Regards.
      Hey Sorry!

      Normally when there has been an error made, it just wont show the header page, however I get the header page (thankyou.html) No Error messages, I was sure that there may have been an issue at the server end - I emailed the guys there and they said there were issues with my code, but I'm not sure what :(

      I just dont get the email. If I use an example off another page that only produces two lines it seems to work.

      Comment

      • Markus
        Recognized Expert Expert
        • Jun 2007
        • 6092

        #4
        Use the mail() in an if clause and see if the mail fails.

        [php]
        $mail = mail(to, from, body...);
        if($mail)
        {
        header("Locatio n... ");
        }
        else
        {
        echo "Mail failed to send";
        }
        [/php]
        Also, have a look at this
        http://www.thescripts. com/forum/thread629295.ht ml
        and turn on your debugging messages.

        I have to scoot to school now, so i wont be back for a few hours.

        Regards, markus.

        Comment

        Working...