Hi guys how are you today, well my question would be :
Is there any possibility to make one common place for editing or deleting records from table which shows records from database(mysql)..
what im trying to do is something like this on screenshot :
http://i.imgur.com/zjsvor8.png
(screen shot isn't from my project, but i'm trying to do it on my php project..)
as u can see in screenshot there is a option buttons in the right corner for each record from database, so what am i trying to do is that when u click on one option button then u click edit or delete it must be take action of that particular record and edit or delete that !.
To show my records on my php project i'm using this code :
<?php
require_once "db.php";
$result = mysql_query("select p_id, p_name, p_lastname, p_parentname, p_age from pacient");
while ($row = mysql_fetch_row($result) ) {
echo "<TR><TH>ID<TH>Name<TH>Last Name<TH>Parent Name<TH>Age<TH>";
echo "<tr><td>";
echo("$row[0]");
echo("</td><td>");
echo("$row[1]");
echo("</td><td>");
echo("$row[2]");
echo("</td><td>");
echo("$row[3]");
echo("</td><td>");
echo("$row[4]");
echo("</td><td>");
?>
So guys how can i make on this code an option buttons for every record on right corner of them, and then 2 buttons, one for edit and one for delete and make them do an particular action ! (editing,or deleting depends on users choice..)
Thanks i appreciate your help !