If you change your code to something like this, I think life will be easier for you. Note how you can format the date in your query, getting rid of a lot of PHP code. You can also use the list() command to easily assign variables returned from mysql_fetch_row. Is status stored as an integer? if it's either 1 or 0...or some other number, then it should be and you don't need the quotes in status = "1". Finally, name all of your for elements with [], which will make them arrays.
$sql_result = mysql_query("SELECT ID,title,url,email,DATE_FORMAT(date,"%d/%m/%Y") as f_date,status,hits FROM your_table WHERE ID='$id'");
//if your where clause does have ID='$id', then you don't need to select it.
//I just don't know what your where clause looks like, or if you even have one.
while (list($id,$title,$url,$email,$date,$status,$hits) = mysql_fetch_row($sql_result))
{
if($date=="") { $date = "(No date available)"; }
if ($status == 1) //storing status as an int? "1" vs 1
{
$checkbox = "<input type=checkbox name=status[] value=1 CHECKED>";
}
else
{
$checkbox = "<input type=checkbox name=status[] value=1>";
}
echo "<tr><td>$id</td>
<td><input type=text name=title[] value=\"$title\"></td>
<td><input type=text name=url[] value=\"$url\"></td>
<td><input type=text name=email[] value=\"$submit\"></td>
<td><input type=hidden name=id[] value=\"$id\"</td>
<td>$date</td>
<td>$hits</td>
<td>$checkbox</td>
</tr>\n";
}
echo "</table></td></tr></table><br>
<table><tr><td><input type=submit value='Make Above Changes'></td><td><input type=reset value='Undo Changes'></td></tr></table></div>";
On your processing page, you loop through all of the results, updating all of the records. You'll need an update for each one though. Are you using the checkbox to mark whether it is updated or not? If not, adding another checkbox to differentiate between which ones to process and not would save you some processing time, rather than updating every row...unless you always update every row no matter what..
for($count=0;$count<count($status);$count++)
{
$sql_query = "UPDATE your_table SET status=$status[$count], title='$title[$count]', url='$url[$count]', email='$email[$count]' WHERE id=$id[$count]";
$result = mysql_query($sql_query);
}
Hopefully that gives you an idea where to go. let me know what other questions you have...
---John Holmes...