Page 1 of 1

Preventing page from loading

Posted: Mon Sep 14, 2009 4:20 pm
by junestag
I'm calling a PHP form processing script from Flash/ActionScript. I don't have <body> tags or anything in my PHP page but it still loads the displays the blank processing page. Is there any way to keep this from happening inside PHP or is this an ActionScript thing?

Re: Preventing page from loading

Posted: Mon Sep 14, 2009 5:32 pm
by ricehigh
I think you need to specify your problem a bit better, to get a proper response. But as I see your problem, you can resolve it by adding this to your form processing php-file:

Code: Select all

<?php
header("Location: ".$_SERVER['HTTP_REFERER']."");
?>
The above code takes the user back to the page it came from, after the form processing. Thus the user will not see a blank page.
Note however, that you can't define a new header, if you have had an output in your form processing php-file.

I hope this resolved your problem :)