Re: header & http referer
| From: | php3 at developersdesk dot com | Date: | Thu, 22 Jun 2000 23:07:13 +0000 |
| Subject: | Re: header & http referer | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-2713@lists.php.net to get a copy of this message | ||
Addressed to: sarahana <sarahana@cyberjunkie.com>
php-general@lists.php.net
** Reply to note from sarahana <sarahana@cyberjunkie.com> Thu, 22 Jun 2000 09:20:29 -0700
>
> Yes, I have been wondering again, and I was wondering:
>
> If a script.php calls for a header redirection, and redirects to
> index.php, can index.php do some functions and head back to
> script.php... $HTTP_REFERER didn't work...
>
> Also, are there any other ways do to redirecting other than header...
> and can you make a refresh function so that it can be called only
> when needed? (without using the meta refresh method)
>
include();
script.php could possibly
include( 'index.php' );
when the code index.php is finished the next line after the include
will be executed, so at that point you could either exit or continue
on with something else. If script.php just wants to display what
index.php would display you could do something like this:
if( you_want_to_show_index ) {
include( 'index.php' );
exit;
}
The URL bar on the browser will say script.php, but the window will
show the result of index.php.
If you want to bounce around multiple files, it becomes more complex.
Rick Widmer
Internet Marketing Specialists
www.developersdesk.com