PHP Bulk Get checkbox value
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")
http://www.bkjia.com/PHPjc/762022.html www.bkjia.com true http://www.bkjia.com/PHPjc/762022.html techarticle PHP Bulk Gets the value of checkbox 1, named inputtype=checkboxname=checkbox[]value=dwmyrow[banzhu]/2, using When the plan is part of a SQL instruction: if the field that participates in the control is number ...