I have some code that I am trying to make into a news feed for my front page. So far I cant get the Update to work. Ps feel free to clean up code and make for practical as this is version 1 I haven't cleaned code up. Thanks Joshua
Update Part
if(isset($_POST['edit']))
{
$checkbox = $_POST['checkbox'];
for($i=0;$i<count($_POST['checkbox']);$i++){
$edit_id = $checkbox[$i];
echo "<textarea name='editsavetext' id='editsavetext' rows='4' cols='50'>$edit_id</textarea>";
}};
if(isset($_POST['editsave'])){
echo $editsavetext;
$editsavetext = $_POST['editsavetext'];
$sql='UPDATE $tbl_name SET home_show = $editsavetext WHERE home_show = $edit_id';
$result = mysql_query($sql);
if($result){
echo "<meta http-equiv='refresh' content='0; url=http://****' />";}};
For Rich Bradshaw
Well at the moment the code doesnt work because i need the system to remember what checkbox was ticks and what is being edited using $edit_id because it doesnt remember the results when being saved so it doesnt effect anything as such.
if(isset($_POST['edit']))
{
$checkbox = $_POST['checkbox'];
for($i=0;$i<count($_POST['checkbox']);$i++){
$edit_id = $checkbox[$i];
echo "<textarea name='editsavetext' id='editsavetext' rows='4' cols='50'>$edit_id</textarea>";
}};
if(isset($_POST['editsave'])){
echo $editsavetext;
$editsavetext = $_POST['editsavetext'];
$sql="UPDATE `$tbl_name` SET home_show = '$editsavetext' WHERE home_show=':edit_id'";
$result = mysql_query($sql);
if($result){echo "<meta http-equiv='refresh' content='0; url=http://****' />";}};

$sql="UPDATE $tbl_name SET home_show = '$editsavetext' WHERE home_show = '$edit_id'";, will it work?mysql_*functions are deprecated and will be removed from future versions of PHP. You should not write new code using them. Usemysqli_*or PDO instead.