Hello guys i'm sorry about the post but i require a little help
I am currently working on a page where information is passed from a database, i use tables on the page, and use sql query to grab all the results.
like this
getusers = $dbh->prepare("SELECT * FROM users WHERE status='0' ORDER BY id DESC");
$getusers->execute();
while($user = $getusers->fetch())
{
echo'<tr>
<td style="width: 20%;">'.$user["username"].'</td>
<td style="width: 10%;">'.$user["age"].'</td>
<td>'.$user["ip"].'</td>
<td><button type="submit" name="Sub1">'.$user['username'].'</button></tr>';
}
all information i need is retuned and the buttons name will change to the username from the database.
for example username test button name would be test. if the username is jay the button is jay
heres what i want, when the button is pressed, i want to be able to get the username of the button from the database, so for example if i have a user in the db called jay, and i press the button that will show as jay, i want to only edit jays records
im sorry if i made this confusing