header()

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
haoest
Forum Newbie
Posts: 1
Joined: Mon Jun 13, 2005 6:04 pm

header()

Post by haoest »

Hello all,

I am having difficulty picking up parameter to header() fucntion.

I downloaded the rfc2616 documentation, but it is so hard to hard.
Does any one know of any tutorials that can set me on my way?
More specificly, I want to know how to redirect the browser with certain variables. If you can give me examples, that would be awsome.

Thanks alot,

Hao
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Code: Select all

header('Location: index.php?var=value&othervar=othervalue');
these varibles will be accessible through $_GET['var'] and $_GET['othervar']
Last edited by John Cartwright on Tue Jun 14, 2005 6:46 am, edited 1 time in total.
Syranide
Forum Contributor
Posts: 281
Joined: Fri May 20, 2005 3:16 pm
Location: Sweden

Post by Syranide »

Jcart wrote:these varibles will not be accessible through $_GET['var'] and $_GET['othervar']
.. they are (don't see why they shouldn't be either)... but I've used it in some hackish pages and I get them as through any other page.

Edit | Typo fixed
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

they definatly are accesable through get, i think jcart made a typo
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

And don't forget to encode your values ;) http://www.php.net/urlencode
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Whoops big typo :roll:
Post Reply