Form is the fastest and easiest way to increase interaction for your site. The form promises you to ask your customers if they like your products and leave comments to visitors who visit your site inadvertently, or ask beautiful girls for their e-forms, which is the fastest and easiest way to increase interaction for your site. The form allows you to ask your customers if they like your products, leave comments to visitors who visit your site inadvertently, or ask beautiful girls for their phone numbers. PHP can greatly simplify data processing based on Web form submission-as shown in our first example below:
--------------------------------------------------------------------------------
<Html>
<Head>
<Basefont face = ' '>
</Head>
<Body>
<Center>
<Form method = 'get' action = 'login. php'>
<Table cellspacing = '5' cellpadding = '5' border = '0'>
<Tr>
<Td>
<Font size = '-1'> What is your name? </Font>
</Td>
<Td align = 'left'>
<Input type = 'text' name = 'name' size = '10'>
</Td>
</Tr>
<Tr>
<Td colspan = '2' align = 'center'>
<Input type = 'submit '>
</Td>
</Tr>
</Table>
</Form>
</Center>
</Body>
</Html>
--------------------------------------------------------------------------------
The <FORM> tag is the most noteworthy for all pages.
--------------------------------------------------------------------------------
<Form method = 'get' action = 'login. php'>
...
</Form>
--------------------------------------------------------------------------------
You may already know that the <FORM> tag's ACTION property value specifies the name of the server-side script that will process the information entered in the FORM-'login. php, and the METHOD attribute is to clarify how information will be transmitted.
Now I will reveal the other half-'login. php' script file. If nothing happens, the script will receive the input name, check whether the user exists, and decide whether to accept or reject the request. Since you have not learned the conditional statements and logic processing of PHP, we are not going to explain it to you now-on the contrary, we only show you how the data submitted in the preceding form is transferred to 'login. php, and can be applied to this file.
This is 'login. php'
--------------------------------------------------------------------------------
<Html>
<Head>
<Basefont face = ' '>
</Head>
<Body>
<Center>
<Font face = ' 'size ='-1'>
I want to know if you have heard of Shakespeare, <? Echo $ name;?>.
<P>
He requested a bunch of roses named by another name, which may smell more fragrant.
<P>
What do you think?
</Font>
</Center>
</Body>
</Html>
--------------------------------------------------------------------------------
When you input data in the form, for example ("zhang san"), and submit it, you will see the following page: