How does php achieve clicking a link in a website to jump back to another page and output a specific value?

Source: Internet
Author: User
How does php achieve clicking a link in a website to jump back to another webpage and output a specific value? in my space, there is an index on my own homepage, and a folder d contains a wordpress there are also index files
My webpage a has two links, but in fact the two links point to the same website B (This website is the wordpress homepage) however, I want to click different links and output different values on site B. the following is what I did, but I cannot output it. I don't know how to change it. please help me change it. thank you.
URL a file
Global $ shuchuid;
Echo "link 1



Link 2 ";

Website B files
Global $ shuchuid;
Echo $ _ GET ['shuchuid'];


Reply to discussion (solution)

Echo "link 1



Link 2 ";
Try

Http://www.colg.biz/pinfo.php. look at what I wrote.

Yes. can you ask why? I don't think of the whole website as a Web site. why is it output? 1. I didn't set this website on the website. Why can I read it out? thank you!

Echo "link 1



Link 2 ";
Try

Yes. can you ask why? I don't think of the whole website as a Web site. why is it output? 1. I didn't set this website on the website. Why can I read it out? thank you!

This is the standard for transferring values between URLs and get... I have never seen any quotation marks in URLs.

Your original method of writing a webpage becomes "link 1 ".

It is equivalent to link to B .com, and the custom parameter shuchuid = '1' is not passed.

======================================
Why can I read the homepage?

Not clear

But http:// B .com/in wp can be seen as a http:// B .com/index.php or http:// B .com/index.html is not what you mean

Http:// B .com /? Shuchuid = 1
The meaning of this URL is to link to the http:// B .com/address and pass a parameter shuchuid whose value is 1

Another http:// B .com /? Shuchuid = 1 and http:// B .com? Shuchuid = 1 is different

Http:// B .com /? Shuchuid = 1
The meaning of this URL is to link to the http:// B .com/address and pass a parameter shuchuid whose value is 1

Another http:// B .com /? Shuchuid = 1 and http:// B .com? Shuchuid = 1 is different
What's the difference between the two outputs? thank you.

There is no difference between the two parameters, but the link they direct to (possibly) is different here they direct to the same link...

You don't need to worry about this...

Oh, thank you.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.