Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: Problems with PHP script

  1. #11
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    exit() and die() are synonyms.
    umm, sorry mate, like I said, im a website n00b. This 'may' be the problem why the email won't send?
    No, but it's still bad practice. Use HTML 4.01 Strict.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  2. #12
    Join Date
    Feb 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    but why would i want to exit the script after validation is complete?
    doesnt that mean that the email wont compile and send after this point?

    even if i remove the exit() after validationOK, the email wont send.

    After entering details in this webpage, it looks like it all working but i dont think anything is happening in the background.

    Cheers

  3. #13
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    die and ext also end all php scripts as well, so if you had any other php scripts on that page, they would all get removed after the point of execution.
    - Mike

  4. #14
    Join Date
    Feb 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by mburt View Post
    die and ext also end all php scripts as well, so if you had any other php scripts on that page, they would all get removed after the point of execution.
    arh okay, thanks mburt.

    Still can't figure out why i wont recieve an email tho... the address is correct and ive tried a hotmail address aswell but with no success.

    maybe i should create a simple script that just sends a blank email from the page to see if that works, and if that works, its something to do with the email compilation...

  5. #15
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Quote Originally Posted by kaliedoscope View Post
    Still can't figure out why i wont recieve an email tho... the address is correct and ive tried a hotmail address aswell but with no success.
    Do you get any error messages? The most likely cause would be the server that it is hosted on, or the server that your hosts uses to send mail. If after trying to make a simple page to send an email doesn't work, try a different server.

    Hope this helps
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  6. #16
    Join Date
    Feb 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thankyou for everyones help.
    I now managed to successfully lodge forms by removing the die() or exit() code halfway through the php. It was quitting the form too early before it could get the data from the fields and email them!

    Cheers again!!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •