PHP Select gets val value how to pass the SQL statement

Source: Internet
Author: User
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.
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.