$qry=mysql_query("Select useradmin from tbladmin");
$credentials=mysql_fetch_array($qry);
if(!isset($_SESSION['user'])){
header("location:index.php");
exit();
}
if(isset($_REQUEST['id'])){
mysql_query("DELETE FROM tblru WHERE userid=" . $_REQUEST['id']);
if(mysql_affected_rows($con)>0){
header("location:administration.php");
exit();
}
else{
echo "ERROR in deleting the user!";
}
}
?>
this upper part is placed on top. and the lower part is in the body. UserID Username Password Add Users
<?php
$result=mysql_query("SELECT * FROM tblru");
if(mysql_num_rows($result)>0){
while($row=mysql_fetch_array($result)){
echo "<tr bgcolor='#999999'>
<td>" . $row[0] . "</td>
<td>" . $row[1] . " </td>
<td>" . $row[2] . "</td>
<td><a href='admininistration.php?id=$row[0]' onClick=\"return confirm('Confirm Deletion of Registered User?');\"><font color='#FFFFFF'>Delete</font></a></td></tr>";
}
}
?>
I cant delete the users data in the database i made. the tblru has id(this is int and is auto incremented, user, and password. i would like to ask if the deletion of data is possible.