The reference content is as follows: if (! Empty ($ _ POST [checkbox]) {$ exprjoin (, $ _ POST [checkbox]); $ sqlselect * fromtbl_namewherefieldin ($ expr );} if the field involved in the control is numeric, if (! Empty ($ _ POST [checkbox]) {$ expr. join (,,
The reference content is as follows: if (! Empty ($ _ POST ['checkbox']) {$ expr = join (",", $ _ POST ['checkbox']); $ SQL = "select * from tbl_name where field in ($ expr)";} if the field to be controlled is numeric, if (! Empty ($ _ POST ['checkbox']) {$ expr = "'". join ("','",
Reference content is as follows:
If (! Empty ($ _ POST ['checkbox']) {
$ Expr = join (",", $ _ POST ['checkbox']);
$ SQL = "select * from tbl_name where field in ($ expr )";
}
If the field involved in the control is numeric
If (! Empty ($ _ POST ['checkbox']) {
$ Expr = "'". join ("', '", $ _ POST ['checkbox']). ".";
$ SQL = "select * from tbl_name where field in ($ expr )";
}
PHP checks whether the Form is submitted
Reference content is as follows:
$ Action = $ HTTP_POST_VARS ["Button1"];
If ($ action = "Submit ")
{
// Execute the form operation
}
Else
{
// Read the default value
}
PHP obtains the string length
Strlen ($ myrow [1])
PHP Url redirection
Header ("Location:". $ _ SERVER ["HTTP_REFERER"]);
PHP super Global Object
Reference content is as follows:
$ A = 1;
$ B = 2;
Function Sum ()
{
$ GLOBALS ["B"] = $ GLOBALS ["a"] + $ GLOBALS ["B"];
}
Sum ();
Echo $ B;
?>
PHP form value
Reference content is as follows:
If mothod = "get", replace $ _ GET ["test"] with $ test.
If mothod = "post", replace $ _ POST ["test"] with $ test.
PHP obtains the current IP Address
PHP gets the current time
Echo date ("Y-m-d G: I: s ");
?>
Date ("Y, m, D ")
Date ("Y-n-j ")