Author Topic: *SOLVED* header()  (Read 708 times)

0 Members and 1 Guest are viewing this topic.

Offline firedrop84Topic starter

  • Enthusiast
  • Posts: 52
    • View Profile
*SOLVED* header()
« on: April 01, 2006, 07:49:01 AM »
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.

Offline wildteen88

  • Guru
  • 'Insane!'
  • *
  • Posts: 12,021
  • Gender: Male
    • View Profile
*SOLVED* header()
« Reply #1 on: April 01, 2006, 08:12:52 AM »
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:
Code: [Select]
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.

Offline firedrop84Topic starter

  • Enthusiast
  • Posts: 52
    • View Profile
*SOLVED* header()
« Reply #2 on: April 01, 2006, 11:04:45 AM »
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

Offline wildteen88

  • Guru
  • 'Insane!'
  • *
  • Posts: 12,021
  • Gender: Male
    • View Profile
*SOLVED* header()
« Reply #3 on: April 01, 2006, 11:42:31 AM »
if your are suing session make sure you have session_start on everypage that uses sessions.