The parameters passed through HTML, PHP query access

Source: Internet
Author: User
The parameters passed through HTML, PHP query access
HTML page to pass data to the PHP page, as a condition parameter query,
database table szd_t; field username, password
I need the query results to be displayed on the HTML page, how do I do it?
$rs->open ("select * from szd_t where username=" $_post["name"], $conn, 1, 1); Is there a problem with this sentence? Other code at least syntax without errors,
The complete code is as follows:
File access.html


<title>Html</title>






File accessdb2.php
$conn = new COM ("ADODB. Connection ");
$connstr = "Driver={microsoft Access DRIVER (*.mdb)}; Dbq= ". Realpath ("Db.mdb");
$conn->open ($CONNSTR);
$rs = new COM ("ADODB. RecordSet ");
$rs->open ("select * from szd_t where username=" $_post["name"], $conn, 1, 1);
while (! $rs->eof)
{
$f = $rs->fields (1);
$f 2 = $rs->fields (0);
Echo $f 2->value;
Echo $f->value;
$rs->movenext ();
}
echo "";
?>

Share to:


------Solution--------------------
Landlord want to know what things ah, their own test if there are errors do not know 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.