passing hidden variables using directs

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
weful
Forum Newbie
Posts: 1
Joined: Tue May 14, 2002 3:30 pm

passing hidden variables using directs

Post by weful »

I'm trying to do something like this:

ob_end_clean();
header("Location: file.php?variable=whatever");
exit;

The only thing is that I want to pass the variable but NOT pass them through the URL (hidden), how do I do this?

Thanks

Tim
8)
jason
Site Admin
Posts: 1767
Joined: Thu Apr 18, 2002 3:14 pm
Location: Montreal, CA
Contact:

Post by jason »

Using header(), you can't. You would essentially have to do a POST to the page, which is probably more trouble than it's worth.

Or, you could simply store the variable in a session variable, and use sessions.
User avatar
cwcollins
Forum Commoner
Posts: 79
Joined: Thu May 16, 2002 3:51 pm
Location: Milwaukee, WI, USA

Re: passing hidden variables using directs

Post by cwcollins »

or use :evil: cookies :evil: .
Post Reply