The PHP batch gets the value of the checkbox
1. Naming
2. Use
When the plan is part of a SQL instruction: if the field that participates in the control is numeric, the
if (! empty ($_post[' checkbox '))) {
$expr = Join (",", $_post[' checkbox ');
$sql = "SELECT * from Tbl_name where field in ($expr)";
}
If the field that participates in the control is numeric, the
if (! empty ($_post[' checkbox '))) {
$expr = "'". Join ("', '", $_post[' checkbox ']). ".";
$sql = "SELECT * from Tbl_name where field in ($expr)";
}
PHP determines whether a form form is submitted
$action = $HTTP _post_vars["Button1"];
if ($action = = "Submit")
{
Perform form actions
}
Else
{
Read default values
}
PHP Gets the string length
Strlen ($myrow [1])
PHP URL Steering
Header ("Location:". $_server["Http_referer"]);
PHP Hyper-Global objects
$a = 1;
$b = 2;
function Sum ()
{
$GLOBALS ["b"] = $GLOBALS ["a"] $GLOBALS ["B"];
}
Sum ();
Echo $b;
?>
PHP form Values
If mothod= "get" uses $_get["test" instead of $test
If mothod= "POST" uses $_post["test" instead of $test
PHP Gets the current IP
PHP Gets the current time
echo Date ("y-m-d g:i:s");
?>
Date ("Y year M month D Day")
Date ("Y-n-j")
The above describes the Pimchanok Leuwisetpaibul PHP daily development tips, including the Pimchanok Leuwisetpaibul aspects of the content, I hope that the PHP tutorial interested in a friend helpful.