Variable transfer between two web pages in php
[Author: Douya added time: 2001-5-28 22:53:08]
In website design, we often use users With this method of logging in, after logging in, general websites will give different pages according to different users. When linking to a new web page of the site or opening a new web page, we will also see the user's information. It can be remembered. It is especially common now that after logging in, you will see greetings such as "XXX, good evening" when linking or opening other web pages of the site. These are of course the results of variable transmission after logging in. In the process of making my personal homepage, I have tried several methods of variable transmission, and I will write them down to discuss with you.
1. This is the stupidest method, and it was also the method I came up with when I didn’t have any contact with sessions or cookies. This method is to transfer the variables to be transferred again in the form of a form. For example, after the user logs in, his information such as $username, $id, etc. is sent to the next web page using a form. Of course, in many cases, it is If you don’t want boxes such as text and options to be seen anymore, you can use hidden input fields. The following is an example. Assume that $username is a variable sent to this page for identity verification on the previous page and verified on this page. If you want to pass it to the next page, you can create the file test4.php:
$ username="Zhang Xiaoming";?>