[thelist] MySQL/PHP deleting a record w/radio buttons

Martin Kuplens-Ewart martin at takingitglobal.org
Fri Feb 28 10:45:22 CST 2003

>I have a simple MySQL database, with 4 fields;
>I'd like to be able to show idnum, title, and pubdate, (along
>with a radio
>button) for all poems in the database.
>The user will select a radio button for appropriate peom, then
>simply hit a 'delete' button, which of course will delete it
>from the database.

>So, can anyone point me to any tutorials/scripts/tips/etc that
>might help?

<input type="radio" name="idnum" value="<?=$myarray[idnum]?>">

Submit your form.... Then

mysql_query("DELETE FROM $db.$table WHERE idnum = '$idnum'");

Then you can do a textbook

header("Location: /original/listing.html");

More information about the thelist mailing list