Home >Backend Development >PHP Problem >How to get the URLs of the first two pages by hiding form controls in PHP?
php method to obtain the URLs of the first two pages by hiding the form control: post the previous URL to elsewhere through the post method, the code is [
How to obtain the URLs of the first two pages by hiding the form control:
By hiding the form control
<input type="hidden" name="prevurl" value="<?php echo $_SERVER['HTTP_REFERER']?>">This way the value of
$_SERVER['HTTP_REFERER']
seems to be temporarily saved to$_POST[prevurl]
里.In fact, the principle of this method is to post the previous URL to another place through the
post
method, but this post is the current page onlyIn the subsequent development, there will be a select tag in the new article part. If the select tag is disabled, the selected value will not be posted, so I once again used the hidden deception method and submitted it secretly. , tried and tested.
Related learning recommendations: PHP programming from entry to proficiency
The above is the detailed content of How to get the URLs of the first two pages by hiding form controls in PHP?. For more information, please follow other related articles on the PHP Chinese website!