我目前已經做了一個顯示所有用戶的頁面,但我只想顯示當前登錄的用戶,請幫助我即時通訊乞求你我花了4個小時沒有T_T im新的在PHP和IM非常丟失,即時如此絕望現在顯示自己的數據只爲PHP中的用戶
<?PHP
$customerquery=mysql_query("select * from customerinfo");
while($customerrows=mysql_fetch_array($customerquery)){
?>
<tr>
<td>Id</td><td>First Name</td><td>Last Name</td><td>Address</td><td>Contact No</td> <td>Username</td><td>Password</td><td>Edit</td>
</tr>
<tr>
<td><?PHP echo $customerrows['id'];?></td>
<td><?PHP echo $customerrows['fname'];?></td>
<td><?PHP echo $customerrows['lname'];?></td>
<td><?PHP echo $customerrows['address'];?></td>
<td><?PHP echo $customerrows['contactno'];?></td>
<td><?PHP echo $customerrows['username'];?></td>
<td><?PHP echo $customerrows['password'];?></td>
<td><a href="edit2.php<?PHP echo '?id='.$customerrows['id']; ?>">edit</a></td>
</tr>
<?PHP } ?>
看看PDO或mysqli的,因爲MySQL擴展您正在使用已經被廢棄。 – GhostGambler