Problems with headers...

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
aybra
Forum Commoner
Posts: 56
Joined: Sun Nov 24, 2002 12:52 am

Problems with headers...

Post by aybra »

Sorry Jason if you answered this... but, i have a header...

Code: Select all

<?php
header("Location: https://www.paypal.com/subscriptions/bu ... =($webplan)&item_number=1&no_note=1¤cy_code=USD&a3=($plan)&p3=($advance)&t3=M&src=1&sra=1");
?>
now.. if memory serves me right I had a working copy if this redirect at one time in my life.. but now can not for the ever loving life of me get it to work... so my question is
since i'm not doing it right... how do you transfer variables inside a header redirect???


thanks much Aybra.
Shadough
Forum Newbie
Posts: 20
Joined: Tue Jun 04, 2002 9:11 pm

Post by Shadough »

how do you transfer variables inside a header redirect???

The same way you would any other place.

eg:

Code: Select all

header("Location: http://www.example.com/page.html?item={$item}&id={$id}&name={$name}");
exit;
You don't need the paranthesis around your variables. Use "{" "}" instead.

I also noticed this: ¤ in the URL. What's that?

I hope that helps a bit.
Post Reply