PHP gets the URL of the first two pages by hiding form controls

Source: Internet
Author: User

I have encountered similar problems in my learning process:

For example, backstage is want to make this kind of son:

But the reality is this:

Workaround:

By hiding form controls

<input type="hidden"name="prevurl"value="<?php echo $_SERVER['HTTP_REFERER']?>">

So the value of $_server[' Http_referer ' appears to be temporarily deposited in $_post[prevurl].

In fact, the principle of this method is to put the previous URL through the Post method to the other place, but this post is the current page

In later development, the section of the new article will have a select tag, and if you enable the disabled of the SELECT tag, you will not post the value you selected, so I once again use the hidden cheat method, secretly submitted once, tried and true.

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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.