This article mainly introduces 8 tips commonly used in PHP website development. This article explains naming, usage, PHP Determine whether the Form form is submitted, PHP obtains the string length, PHP super global object, etc. Friends who need it can refer to it
PHP is a server-side scripting language used to create dynamic WEB pages. Like ASP and ColdFusion, users can use a mixture of PHP and HTML to write WEB pages. When a visitor browses to the page, the server will first process the PHP commands in the page, and then transmit the processed results together with the HTML content to Access browser. But unlike ASP or ColdFusion, PHP is an open source program with good cross-platform compatibility. Users can run PHP on Windows NT systems and many versions of Unix systems, and can run PHP as a built-in module of the Apache server or as a CGI program. This article summarizes 8 tips commonly used in daily PHP development.
PHP batch gets the checkbox value
1. Naming
The code is as follows:
The code is as follows:
The code is as follows:
if($action=="Submit")
{
//Perform form operations
}
else
{
//Read default value
}
The code is as follows:
The code is as follows:
The code is as follows:
If method="get" use $_GET["test"] instead of $test
If method="post" use $_POST["test"] instead of $test
7. Get the current IP with PHP
The code is as follows:
The code is as follows: