ajax 数据库交互(3)

来源:互联网 发布:java中aop是什么意思 编辑:程序博客网 时间:2024/05/21 09:06
<?include "../conn/conn.php";$q=$_GET["q"];echo $sql="select * from test where id=".$q;$rst=mysql_query($sql);echo "<table border='1'>     <tr>     <th>FirstName</th>     <th>LastName</th>     <th>Age</th>     <th>Home</th>     <th>Job</th>     </tr>";while ($row=mysql_fetch_array($rst,MYSQL_ASSOC)){echo "<tr>";echo "<td>".$row['FirstName']."</td>";echo "<td>".$row['LastName']."</td>";echo "<td>".$row['Age']."</td>";echo "<td>".$row['Home']."</td>";echo "<td>".$row['Job']."</td>";echo "</tr>";}echo "</table>";mysql_close($conn);?>