;

PDA

Click to See Complete Forum and Search --> : PHP: die() stopping the rest of page from rendering


toolbox
10-23-2004, 04:07 AM
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?

macca25
10-23-2004, 12:11 PM
Hi,
Can you post the offending script?

Cheers,
macca

argonauta
10-23-2004, 05:58 PM
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.

toolbox
10-24-2004, 03:42 AM
Hi.

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