Re: page redirecting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux