PHP Select gets val value how to pass to SQL statement
Click on the left side to show the data
The code is as follows: Help to see ha
Please select foreach (Range (' A ', ' Z ') as $val) {echo '"Echo $val; echo";}? >
Require_once ' admin/config.php ';
if ($conn) {
$stmt =odbc_exec ($conn, "select DISTINCT [Category] from [website goods view] WHERE [category] like ' A% '");
if ($stmt) {
$arr =array ();
while ($row =odbc_fetch_array ($stmt)) {
$arr []= $row;
}
for ($i =0; $i <>
{
if ($i%4==0) {
echo "";
}
?>
}
}
}
?>
Share to:
------Solution--------------------
Without the refresh, you have to use Ajax to do, the value of the Select box to php,php return JSON data to JS,JS complete page mapping.
------Solution--------------------
Overriding the OnChange event handler, the function sends an AJAX request for the SEL value to the server, and the results are displayed to the right.
Ajax online A lot of examples, look for it.