Jump to content

Header with variable problem


sqishy

Recommended Posts

I don't know If i just have the syntax wrong or what but i am trying to send a variable through the header and it will not work.

 

current code...

//send user to topic

header("Location: showtop.php?t_id=".$_POST["t_id"]."&rt=");

 

The above works.

Below is what i am trying to do.

header("Location: showtop.php?t_id=".$_POST["t_id"]."&rt=".$_GET['rt']);

 

I put $_GET['rt'] into a variable and it echo the correct value, but when i place it in this line of code to go to the header the URL shows up without the 'rt' value. So i don't know if the sentax is wrong or what. Please help

 

example of what shows in URL "showtop.php?t_id=8&rt= "

Link to comment
https://forums.phpfreaks.com/topic/135753-header-with-variable-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.