Deleting a row in mysql through php

wxdqz

New Member
I have this following script out put. What i am trying to do is output all the information in the db to a browerser, with a checkbox nexy to it, and when the check box is selected and you click delete it delets that selected row.. I am stuck after this code.
Thanks for your help
Anthony

<?

$connection = mysql_connect("localhost", "user", "pass") or die("couldn't connect");
$db = mysql_select_db("dev",$connection);
$sql = "SELECT artid, author, title, date FROM articles";
$result = mysql_query($sql, $connection) or die("couldn't execute query");
while ($dev = mysql_fetch_array($result)) {
$artid = $dev['artid'];
$author = $dev['author'];
$title = $dev['title'];
$date = $dev['date'];
echo ("<table border='1' width='100%'>\n");
echo ("<form method=post action=$php_self>");
echo ("<tr><td><input type=checkbox name=$artid><td>Artid</td><td>Author</td><td>Title</td><td>Date</td></tr>");
echo ("<tr><td>$artid</td><td>$author</td><td>$title</td><td>$date</td></tr>");
}
?>
 
Back
Top