ok forget all that now, i got it, sorta. All i need to know (or do) is fix something. I put it in a while statement, i want it to be: if you check a box, that news artical will be deleted, but the way it is working, is that it is saving the checked ones and deleting the others. If you want to see the code it is:
<head>
<title>Edit News</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<?php
include("../config.inc");
//Connects to MySQL database
$link = mysql_pconnect("$host", $user, $pass);
if(!$link) die ("Couldnt connect to MySQL database");
mysql_select_db($data, $link) or die ("Couldnt open $data: ".mysql_error());
$query = "SELECT FROM acidnews ORDER BY id DESC";
$result = mysql_query($query);
$num = mysql_num_rows($result);
$acidnews = mysql_query("SELECT FROM acidnews ORDER BY id DESC");
$i = 0;
if(isset($delete))
{
while($row = mysql_fetch_array($acidnews))
{
$sql = ("DELETE FROM acidnews WHERE id=$row[id]");
$result2 = mysql_query($sql);
$row2 = mysql_fetch_array($acidnews);
print "Number $row2[id] Record deleted<br>";
}
}
if($num <= $i)
{
print "There is currentlly no news in the archive.";
}
elseif($num == 1)
{
print "There is currentlly $num news artical in the archive";
while($row = mysql_fetch_array($acidnews))
{
print "<form name=\"delete\" action\"$PHP_SELF\" method=\"POST\"><table width=\"500\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\" bordercolor=\"#000066\" align=\"center\">
<tr bgcolor=\"#666666\">
<td width=\"2\"><font color=\"#FFFFFF\"><div align=\"center\"><b>$row[id]</b></div></td>
<td width=\"498\"><font color=\"#FFFFFF\"><b>$row[title] </b></font>Submitted by: $row[submitby]</td>
</tr>
<tr>
<td width=\"2\"><input type=\"checkbox\" name=\"delete\" value=\"checkbox\"></td>
<td width=\"498\">$row[body]</td>
</tr>
<tr>
<td width=\"2\"> </td>
<td width=\"498\"><div align=\"right\"></div></td>";
print "</tr>
</table><br>";
}
print "</table></center>\n";
print "<input type=\"submit\" name=\"Submit\" value=\"Submit\"><form>";
}
elseif($num > $i)
{
print "There are curentlly $num news articals in the archive. <p>";
while($row = mysql_fetch_array($acidnews))
{
print "<form name=\"delete\" action\"$PHP_SELF\" method=\"POST\"><table width=\"500\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\" bordercolor=\"#000066\" align=\"center\">
<tr bgcolor=\"#666666\">
<td width=\"2\"><font color=\"#FFFFFF\"><div align=\"center\"><b>$row[id]</b></div></td>
<td width=\"498\"><font color=\"#FFFFFF\"><b>$row[title] </b></font>Submitted by: $row[submitby]</td>
</tr>
<tr>
<td width=\"2\"><input type=\"checkbox\" name=\"delete\" value=\"checkbox\"></td>
<td width=\"498\">$row[body]</td>
</tr>
<tr>
<td width=\"2\"> </td>
<td width=\"498\"><div align=\"right\"></div></td>";
print "</tr>
</table><br>";
}
print "</table></center>\n";
print "<input type=\"submit\" name=\"Submit\" value=\"Submit\"><form>";
}
?>
</body>