Troubleshooting - Why isn't this working?

[code]<?
include_once(’…/php/config.php’);
mysql_connect($dbhost,$dbuser,$dbpass);
mysql_select_db($dbname);
$id=$HTTP_GET_VARS[‘id’];

if($id)
{
$sql=“SELECT * FROM fiction WHERE id=’$id’”;
$result=mysql_query($sql);
$rs=mysql_fetch_array($result);
}
if($_POST[‘edit_fiction’] == “Update”)
{
$id=$_POST[‘id’];
$type=$_POST[‘type’];
$title=$_POST[‘title’];
$author=$_POST[‘author’];
$desc=$_POST[‘desc’];
$content=$_POST[‘content’];
/$cust_address1=$_POST[‘image’];/
$image=$_FILES[‘image’][‘name’];

if($_FILES[‘image’][‘name’])
{
//upload file
$target_path = “upload/”;

$target_path = $target_path . basename( $_FILES['image']['name']); 

move_uploaded_file($_FILES['image']['tmp_name'], $target_path);

//end upload file

$thumb=$_FILES[‘thumb’][‘name’];

//upload file2
$target_path = “…/upload/”;

$target_path = $target_path . basename( $_FILES[‘thumb’][‘name’]);

if(move_uploaded_file($_FILES[‘thumb’][‘tmp_name’], $target_path)) {
echo "The file “. basename( $_FILES[‘thumb’][‘name’]).
" has been uploaded”;
} else{
echo “There was an error uploading the file, please try again!”;
}
//end upload file2

$sql = "UPDATE fiction SET  title='$title', author='$author', desc='$desc', content='$content', thumb='$thumb', image ='$image', featured='$type' where id = '$id'";
} else {
$sql = "UPDATE fiction SET  title='$title', author='$author', desc='$desc', content='$content' where id = '$id'";
}

$result=mysql_query($sql);

//$_SESSION['sess_msg'] = "User Information Updated Successfully.";
//header("Location: preview_fiction.php");
?>
<script type="text/javascript">
 
 window.location='fiction.php';

 </script>
<?
exit;

}
include(“header.php”);
?>

Fiction

>Normal Entry >Featured Entry >Archived Entry CATEGORY // POSITION ON FICTION PAGE
100 x 100 // THUMBNAIL FOR NORMAL ENTRY
444 x 166 // BANNER FOR FEATURED ENTRY
'> TITLE // ASCII (VARCHAR 255)
'> AUTHOR // ASCII (VARCHAR 255)
<?=$rs['desc'];?> <?=$rs['content'];?> [/code]

When I hit update, it’s not remitting the changes to the MySQL database.

desc is a reseved keyword in mysql

Yes I have tried to debug it based up to my knowedge of PHP.

I’m just starting out so the extent to which I’m able to debug isn’t that great. That’s why I posted here.

sry, hope u have seen that that is a link, and not there to offend u.

No, I did realize it was a link.

Thanks for the help

As an update, I did figure it out. As you pointed out, changing the desc fixed things.

Thanks!

Sponsor our Newsletter | Privacy Policy | Terms of Service