A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: PHP: die() stopping the rest of page from rendering

  1. #1
    Member
    Join Date
    Feb 2004
    Location
    Somewhere on Earth (I think)
    Posts
    87

    PHP: die() stopping the rest of page from rendering

    Hi.

    I have a form, which has action set as "$_SERVER['PHP_SELF']" which uses the script inside the current page to process the data in the form and make sure it is correctly entered.

    The problem I get is when using die() function in this error checking, it not only stops the php script from executing, but it also stops the rest of the html page from rendering.

    Does anyone know any way around this?

  2. #2
    Hi,
    Can you post the offending script?

    Cheers,
    macca

  3. #3
    poet and narcisist argonauta's Avatar
    Join Date
    Nov 2001
    Location
    Under the bed
    Posts
    2,080
    that s what it s supposed to do

    die=exit=finish the script, stop running it, dont bother with what s left in the page.....


    here you have a reference.
    http://www.php.net/manual/en/function.exit.php

    Probably, as they state there, u may use return instead of die, or simply don t use die at all.
    my blog: blog.innocuo
    Sponsored by your mom.

  4. #4
    Member
    Join Date
    Feb 2004
    Location
    Somewhere on Earth (I think)
    Posts
    87
    Hi.

    Thanks a lot, I found plenty of solutions on the php-reference site.

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center