Paypal Hidden variables doesn't work [duplicate]
Possible Duplicate:
Variables upon submitting Paypal form
//Buy.php
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="hosted_button_id" value="EWE57TOG6A1GO">
<input type="hidden" name="user_id" value="12345">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_paynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
</form>
After the successful payment. You'll be redirected to
www.thankyou.com/thankyo开发者_JAVA技巧u.phptx=2TB90771KK039521H&st=Completed&amt=1.00&cc=PHP&cm=&item_number=11
//Thankyou.php
<?php
extract($_REQUEST);
echo $user_id;
?>
I am trying to print the user_id but it is empty.
So my Question is:
1) How can I send variable from my site to paypal? (talking about the user_id)
2) How to get the value of that user_id when redirected to thankyou.php?
Thanks in ADVANCE!
Try this. It worked for me when I implemented PayPal.
<?php
$user_id = $_REQUEST['user_id'];
echo $user_id;
?>
Slight edit: The array parameter should be in quotes and the double quotes are unnecessary in the echo statement.
精彩评论