<snip>
The Location: header requires a correctly formed URL, ie http://...
</snip>

I'm running fine using only Location:home.php on Mozilla & IE 6

maybe I should change.
Cheers,
Mun Heng, Ow
H/M Engineering
Western Digital M'sia 
DID : 03-7870 5168


-----Original Message-----
From: Jason Wong [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 31, 2003 11:13 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] session header issue


On Thursday 31 July 2003 06:39, Sam Folk-Williams wrote:
> I've got a site with a login authentication script in a file called
> login.php. Every page has a simple session check on top of it, as well
> as line that captures the name of the file the user is trying to view.
> The idea is that if the user tries to go straight to an inside page
> without logging in, they get sent to the login page (index.php) with the

Don't you mean they get sent to login.php?

> variable $file marking the page they wanted to view. When they log in,
> the $file variable is sent to login.php and (if $file is set) login.php
> returns them to the page they were trying to view using a simple header
> redirect: header("Location: $file");

The Location: header requires a correctly formed URL, ie http://...

> Problem: instead of sending them to the page they wanted to view, they
> get sent to this URL: login.php?file=/dir/file_name.php?v=123
>
> What's going on here? Why doesn't "Location: $file" return the contents
> of $file?

What do you mean? Have you checked that $file contains what you expect it to

contain? Putting $file inside double-quotes doesn't magically transform its 
contents.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
QOTD:
        "Unlucky?  If I bought a pumpkin farm, they'd cancel Halloween."
*/


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to