Can some one help me with this please, I wrote a simple user authentication program and the next thing I would like to do is edit or delete each user. Below is the PHP code to display all the users in the database. I would like to add a Radio button in front of each users and when I select one user using the Radio button and click on edit or delete button a new page will be open with the selected users details and I will be able to edit or delete this users. Also I would like to display an error message if none is selected and clicked on one of the buttons. Could you please advise me on how to implement this.
Thank you for all your help.
<html>
<head>
<link rel=stylesheet href="StyleInterface.css" type="text/css">
<title>Users</title>
</head>
<body>
<h2>Users Account</h2>
Code: Select all
<?php
mysql_connect("localhost") or die ("Unable to connect to databse.");
mysql_select_db("users") or die ("Unable to select database.");
$resultID = mysql_query("SELECT * FROM users");
print "<table border=1><tr><th>User ID</th>";
print "<th>Full Name</th><th>User Name</th><th>Password</th><th>Email Address</th><th>Application ID</th>";
while ($row = mysql_fetch_row($resultID))
{
print "<tr>";
foreach ($row as $field)
{
print "<td>$field</td>";
}
print "</td>";
}
print "</table>";
?></html>