php Batch get checkbox value
1, named
<input type= ' checkbox ' name= ' checkbox[] ' value= $dwmyrow [banzhu] />
2, use
When a plan is treated as part of an SQL directive: if the field that participates in control is numeric,
if (! empty $_post[ CheckBox ']) {
$expr = join (",", $_post[' checkbox '));
$sql = "select * from tbl_name where field in ($expr)";
}
If the field participating in the control is numeric,
if (! empty ($_post[' checkbox ')) {
$expr = "'. Join (" ', ' ", & nbsp;$_post[' checkbox ']). ".";
$sql = "select * from tbl_name where field in ($expr)";
}
PHP Determines whether the form form is submitted
$action = $HTTP _post_vars["Button1"];
if ($action = = submit)
{
//Execute form Action
}
Else
{
//read default
}
php Get string length
strlen ($myrow [1])
php url to
Header ("location: ". $_server[" Http_refereR "]);
PHP Hyper-Global Objects
<?php
$a = 1;
$b = 2;
Function sum ()
{
$GLOBALS ["B"] = $GLOBALS ["A"] $GLOBALS ["B"];
}
Sum ();
echo $b;
?>
php form Values
if mothod= "get" replace $ with $_get["test"] test
If mothod= "POST" use $_post["test"] instead of $test
php to get current IP
<?= $HTTP _server_vars["remote_addr"]?>
php get current time
<?php
Echo date ("y-m-d g:i:s");
?>
Date ("Y year m month d days")
date ("Y-n-j")