In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article introduces the knowledge of "three common ways for PHP to send values to different pages". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
one。 POST value
Post passing value is a form jump method for html, which is very convenient to use. For example:
The action in form fills in the url path of the jump page, and the method fills in the post method. When the submit button in the form form is pressed, all the contents of name in form will be transferred to the filled url, which can be obtained through $_ POST ['name'], for example:
Here is a very convenient tip. When type is selected as' hidden''in the input tag, the input tag will be hidden and will not be displayed on the page, but the input tag will be hidden in the form and has a name value and value value, which will also be passed along with the submit button. This hidden tag can pass some content that you do not want to show.
2. Get value
The GET value is passed by following url, and when the page jumps, it jumps with url. It is often used for the use of labels. For example:
Click me to jump.
Once you jump into xxx.php, you can get the passed value through $_ GET ['id']. The GET method is often used in URL to delete or read the php file of an id.
III. Passing values from session
SESSION is a kind of global variable, which is often used to save common data such as user id after logging in. Once saved in SESSION, other pages can be obtained through SESSION. For the use of SESSION, enable session:
This is the end of the content of "three common ways for PHP to pass values to different pages". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.