| Author |
Redirection & Sql...
|
|
| gerkintrigg 2004-08-18, 3:57 pm |
| I dunno if this is the right place to post this:
I've created a membership system and a large member list which i
use for lotsa things. i can do the login and stuff but i have a small
problem.
I'm trying to find or write a code that checks:
--------
if (!_SESSION['Logged_In'] ==
'Logged In') {
--------
and then re-directs the page to another url such as:
--------
root.'/errorpages/not_logged_in.php';
--------
Problem is that I don't know how to do a header re-direct AFTER
the session start tag and I really DON'T wanna use JavaScript.
I've done it before a while back but I can't for the life of
me remember how!
Please help.
Thanks.
Neil Trigger
http://www.magic2k.com - The ultimate magic resource
http://www.oddmap.com - Strange holiday destinations
----------------------------------------
The post originated from PHP Freaks:
----------------------------------------
http://www.phpfreaks.com
http://www.phpfreaks.com/forums
| |
|
|
|
| "gerkintrigg" wrote:
> I dunno if this is the right place to post this:
>
> I’ve created a membership system and a large member list which i
> use for lotsa things. i can do the login and stuff but i have a
small
> problem.
>
> I’m trying to find or write a code that checks:
> --------
> if (!_SESSION[’Logged_In’] ==
> ’Logged In’) {
>
> --------
> and then re-directs the page to another url such as:
> --------
> root.’/errorpages/not_logged_in.php’;
> --------
> Problem is that I don’t know how to do a header re-direct AFTER
> the session start tag and I really DON’T wanna use JavaScript.
>
> I’ve done it before a while back but I can’t for the life
> of
> me remember how!
>
> Please help.
> Thanks.
>
> Neil Trigger
> http://www.magic2k.com - The ultimate magic resource
> http://www.oddmap.com - Strange holiday destinations
>
> ----------------------------------------
> The post originated from PHP Freaks:
> ----------------------------------------
> http://www.phpfreaks.com
> http://www.phpfreaks.com/forums
I don’t know what session start tag has to do with it, but you can
generally buffer your ouput. This avoids problems with header
redirection. Look at ob_start in the docs.
--
http://www.dbForumz.com/ This article was posted by author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbForumz.com/PHP-SQL-Red...pict140917.html
Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbForumz.com/eform.php?p=473242
|
|
|
|