Jump to content


Photo

*SOLVED* header()


  • Please log in to reply
3 replies to this topic

#1 firedrop84

firedrop84
  • Members
  • PipPipPip
  • Advanced Member
  • 49 posts

Posted 01 April 2006 - 12:49 PM

I just want to ask if I use header in one page does it pass the varilabes to the other page that header is pointing to.

#2 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 01 April 2006 - 01:12 PM

What do you mean by other variables. If it is variables being passed through the url, ie page.php?var=value1&var2=value2 Then you'll need to place in the header redirect itself like so:
header("page.php?var=value1&var2=value2");

If you have POST'd data from a form or any other variables then no you will need to either pass these over the URL or use a session to store these on the server and you'll be able to use them on the page that you are redirecting the usert to.

#3 firedrop84

firedrop84
  • Members
  • PipPipPip
  • Advanced Member
  • 49 posts

Posted 01 April 2006 - 04:04 PM

thanx I was trying to use sessions but I had some problems with so I passed the variables through the URL. Its working now.

firedrop

#4 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 01 April 2006 - 04:42 PM

if your are suing session make sure you have session_start on everypage that uses sessions.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users