简体   繁体   中英

How to show a specific row? Using SQLite + HTML5 + Javascript

How to show a specific row? In HTML + PHP I would do something like this:

<a href="show.php?id=5">See the ID #5</a>

And the show.php

<?php 
$query = mysql_query("SELECT name FROM table WHERE id=$_GET[id]");
$row = mysql_fethc_assoc($query);
echo $row['name'];
?>

But how can I do this with only HTML + Sqlite?

I would have to solve the problem in this way.

<?php 
    $query = mysql_query("SELECT name FROM table WHERE id=$_GET[id]");
    $row = mysql_fethc_assoc($query);
    if($row['name']=="the name you want to find")
    {
    echo $row['name'];
    }
    ?>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM