I am working on an admin interface, where you have a list of database entries with checkboxes. In the end there are three drifferent buttons connected to three different functions. I need to get the id of the entry by clicking on the checkbox and then connect it somehow to the functions (functions are: delete, move to a database with different structure and send an e-mail). How do I pick up the id? And will irt work with more than one id? Here is my interface:<?php $result = mysql_query("SELECT * FROM db1 ORDER BY name1")or die ('Error: '.mysql_error ()); ?>
//This is the list with the checkboxes
|<?php echo $show[name2]; ?>||<?php echo $show[name1]; ?>||<?php echo $checkboxname; ?>|
And here is the function “Delete” as an example:
echo $checkboxname;//Has always the value 0 for some reason, although what I select has another id…
$myquery = “DELETE * FROM db1 WHERE id=’’.$checkboxname.’’”;
Well, this just doen’t work… Can anybody help me?