Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6633717
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:50:43+00:00 2026-05-25T22:50:43+00:00

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

  • 0

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/thankyou.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!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T22:50:44+00:00Added an answer on May 25, 2026 at 10:50 pm

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Are global variables in PHP considered bad practice? If so, why? global
Possible Duplicate: Multiple index variables in PHP foreach loop Can we echo multiple arrays
Possible Duplicate: Can you use $_GET variables when including a file in PHP? Is
Possible Duplicate: How do I use PHP variables as values for the <script> tag
Possible Duplicate: How to access PHP variables in JavaScript or jQuery rather than <?php
Possible Duplicate: Can you unset() many variables at once in PHP? $var1 = $var2
Possible Duplicate: Why PHP variables start with a $ sign symbol? I have looked
Possible Duplicate: How to pass JavaScript variables to PHP? I want to assign the
Possible Duplicate: Unpythonic way of printing variables in Python? In PHP one can write:
Possible Duplicate: Global variables in R ad the beginning of the file I wrote:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.