I have created a file called testview.php which consists of a table which shows all the data that is in the "user" table in a database. I have created the Username to be a hyperlink, but what i want it to do is view all the information for that particular user on another page when clicking the users respective name.
heres my current code:
<td><?php
$conn = mysql_connect("localhost","root","") or die("Could Not Connect To The Database");
mysql_select_db("aziz",$conn) or die("Could Not Select The Database");
$result=mysql_query("SELECT user_id,az_firstname,az_surname,username FROM azizpassword ORDER BY user_id;");
$i=0;
while( $row=mysql_fetch_array($result) )
{
if($i>0)
{
echo "<tr valign=top>";
echo "<td bgcolor=#ffffff background='img/strichel.gif' colspan=6><img src=img/blank.gif wuser_idth=1 height=1></td>";
echo "</tr>";
}
echo "<tr valign=center>";
echo "<td width=100 class=table><b>".$row['user_id']."</b></td>";
echo "<td width=100 class=table><a href='view.html'>".$row['az_surname']."</a></td>";
echo "<td width=100 class=table>".$row['az_firstname']." </td>";
echo "<td width=100 class=table><i>".$row['username']."</i> </td>";
echo "<td class=table></td>";
echo "</tr>";
$i++;
}
echo "<tr valign=bottom>";
echo "<td bgcolor=#fb7922 colspan=6><img src=img/blank.gif wuser_idth=1 height=8></td>";
echo "</tr>";
?></td>
This is the code i have done to create the table that has the user name as a hyperlink.
for now, i would appreciate the help on how to view a particular users details (number, surname, firstname, password) on a different page when clicking on the hyperlink of his surname.
i know that i am just seeing the same information again on a different page (for the time being, but on a different page, however, i will redesign and modify etc.. after. 🙂
I hope someone could help me with this thank you very much for your time