i resolved my other thread because i changed my mind on how i wanted this done, and the topic no longer related to the way i want it done now..
here is my delete news script.. as you can see, it selects everything from my news table and displays it in an array, each row having a checkbox, that when checked, i want it that row to be deleted from the table..
im stuck here because i dont know how to start.. anyone?
if ($status == 'delete') {
$query = mysql_query("SELECT * FROM news ORDER BY id");
$numrows = mysql_num_rows($query);
if(empty($numrows)) {
echo "no rows";
}else{
echo "<table width='350' cellpadding='0' cellspacing='0' bgcolor='#AAAAAA'>";
echo "<tr valign='top'>";
echo "<td width='100%'>";
echo "<table width='100%' cellpadding='3' cellspacing='1' align='left'>";
echo "<tr>";
echo "<td width='100%' bgcolor='#EEEEEE'>";
echo "<div align='center'><input type='submit' name='dsubmit' value='Delete Selected'></div>";
echo "</td></tr></table></td></tr></table><br>";
echo "<form name='deletenews' method='post'>";
while($deletearray = mysql_fetch_array($query)) {
echo "<table width='350' cellpadding='0' cellspacing='0' bgcolor='#AAAAAA'>";
echo "<tr valign='top'>";
echo "<td width='100%'>";
echo "<table width='100%' cellpadding='3' cellspacing='1' align='left'>";
echo "<tr>";
echo "<td width='100' bgcolor='#EEEEEE'>";
echo "Delete";
echo "</td><td width='250' bgcolor='#EEEEEE'>";
echo "<div align='right'><input class='checkbox' type='checkbox' name='dicheckbox' value='".$deletearray[id]."'>";
echo "</td></tr>";
echo "<tr>";
echo "<td width='100' bgcolor='#EEEEEE'>";
echo "Topic";
echo "</td><td width='250' bgcolor='#EEEEEE'>";
echo "<input type='text' name='ditopic' size='40' value='".$deletearray[topic]."' disabled>";
echo "</td></tr>";
echo "<tr>";
echo "<td width='100' bgcolor='#EEEEEE'>";
echo "Message";
echo "</td><td width='250' bgcolor='#EEEEEE'>";
echo "<textarea rows='7' cols='40' name='dimessage' disabled>".$deletearray[message]."</textarea>";
echo "</td></tr>";
echo "<tr>";
echo "<td width='100' bgcolor='#EEEEEE'>";
echo "Author";
echo "</td><td width='250' bgcolor='#EEEEEE'>";
echo "<input type='text' value='".$deletearray[author]."' disabled>";
echo "</td></tr></table>";
echo "</td></tr></table><br><br><br>";
}
echo "</form>";
if($_POST['dsubmit']) {
}
}
}