PHP Header Help

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
VarwigDude
Forum Newbie
Posts: 12
Joined: Tue Mar 31, 2009 8:08 pm

PHP Header Help

Post by VarwigDude »

I am trying to redirect a page for certain products.

My Code Is

Code: Select all

 
$getproductid = $_GET["product_id"];
....
header('Location: http://www.myswebsite.com/auction/?x=pr ... productid');
 
It does redirect but the url is http://www.mywebsite.com/auction/?x=pro ... tproductid. But i want the actual product id to show up. Any Help
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: PHP Header Help

Post by requinix »

Strings
Single quoted

The simplest way to specify a string is to enclose it in single quotes (the character ').

To specify a literal single quote, escape it with a backslash (\). To specify a literal backslash before a single quote, or at the end of the string, double it (\\). Note that attempting to escape any other character will print the backslash too.

Note: Unlike the two other syntaxes, variables and escape sequences for special characters will not be expanded when they occur in single quoted strings.
VarwigDude
Forum Newbie
Posts: 12
Joined: Tue Mar 31, 2009 8:08 pm

Re: PHP Header Help

Post by VarwigDude »

Worked Thank You Very Much :mrgreen:
Post Reply