Re: page redirecting
| From: | Richard Lynch | Date: | Wed, 28 Jun 2006 21:16:08 +0000 |
| Subject: | Re: page redirecting | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-238855@lists.php.net to get a copy of this message | ||
On Wed, June 28, 2006 5:17 am, kristianto adi widiatmoko wrote:
> i need to redirecting page, it could be done by using header function
> like this
>
> header("Location : page2.php?var1=foo");
For starters, it "Location :" should be "Location:" (no space)
Then, the URL should be a full, complete URL, and not just a local
reference.
Finally, using a re-direct instead of just include'ing 'page2.php' is
usually daft because it just wastes HTTP connections and makes your
application a lot slower and harder to debug/understand.
> but i need to hide variable from being displayed by browser since the
> content of variable is secret.
>
> I guess i need POST method instead of GET for redirecting that page.
You could just use session_start() at the top of both pages, and slam
the data into $_SESSION, and then your Location: redirect would "work"
--
Like Music?
http://l-i-e.com/artists.htm