Preventing page from loading

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
junestag
Forum Commoner
Posts: 39
Joined: Tue Sep 18, 2007 5:14 pm
Location: Alaska
Contact:

Preventing page from loading

Post 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?
ricehigh
Forum Newbie
Posts: 21
Joined: Mon Sep 14, 2009 5:18 pm

Re: Preventing page from loading

Post 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 :)
Post Reply