javascript - How to open a pop-up window based on selected id using radio button and how to pass that selected id to pop-up window, using php,MySQL
I am using mysql_fetch_array() to fetch data from MYSQL and I am displaying that data in the form of HTML table using PHP. HTML Table's first column is primary key of data base table. I added radio button to it while displaying fetched result. I have UPDATE and DELETE buttons on top of HTML table. If I select a radio button and click UPDATE/DELETE, a pop-up window should appear to display that selected row values. For this I think I need to pass selected row id/key to pop-up window. If any one know how to achieve it, let me know!
<?php
while($rows=mysql_fetch_array($result))
{
?>
<table>
<tr>
<td><? echo $rows['ID']; ?></td>
<td><input type="radio" name="" value=""><? echo $rows['Name']; ?></td>
<td><? echo $rows['Surname']; ?></td>
<td><? echo $rows['Number']; ?></td>
</tr>
</table>
<?php
}
?>
Thanks In Advance!!!
Answer
Solution:
please see this code
hope it will usefulllll
Answer
Solution:
You can perform UPDATE and DELETE operation by using below code.
Javascript:-
Same you can do for
DELETE
as well.See live demo here