【发布时间】:2011-04-06 08:14:46
【问题描述】:
$row[0] 是 user_id 当我点击 user_id 我需要知道如何使用 php 从 html 表中获取我点击的值,所以我可以使用这个 id 将其数据选择到另一个表单中,以便我可以编辑它
$select = "SELECT U.id, U.first_name, U.last_name, U.email_address, U.password, U.gender, U.day, U.month, U.year, COUNT(O.user_id) FROM users U LEFT JOIN orders O ON U.id = O.user_id GROUP BY U.id ORDER BY id $order LIMIT $offset , $rowsPerPage";
$result=mysql_query($select) or die(mysql_error());
while($row=mysql_fetch_array($result)){ ?>
<table>
<tr>
<td><?php echo "<a href= 'editUser.html'> $row[0]</a>"; ?></td>
<td><?php echo $row[1];?></td>
<td><?php echo $row[2];?></td>
<td><?php echo $row[3];?></td>
<td><?php echo $row[4];?></td>
<td><?php echo $row[5];?></td>
<td><?php echo $row[6];?></td>
<td><?php echo $row[7];?></td>
<td><?php echo $row[8];?></td>
<td><?php echo $row[9];}
</tr>
</table>
【问题讨论】: