I can't understand why this query doesn't work... I putted the query in an if with an echo to see if it returns true and he does! But if I go to see if the sql table, it hasn't been updated... Can someone help me?
This is the code:
$rowpost='';
if(isset($_POST['rowpost'])){
$rowpost  = $_POST['rowpost'];
$rowpost  = implode(' ', $rowpost);
  if(mysql_query("UPDATE prodotti SET vetrina='$rowpost' WHERE id='$_GET['id']'")){
    echo 'rowpost';
  }
}
if(isset($_POST['addrowname'])){
$filename = "showcase.txt";
$contents = file_get_contents($filename);
$newcontent = $contents.' '.$_POST['addrowname'];
fwrite(fopen($filename, 'w'), $newcontent);
if(isset($_POST['chkaddshcs'])){
  $rowpost  = $_POST['addrowname'].' '.$rowpost;
  if(mysql_query("UPDATE prodotti SET vetrina='".$rowpost."' WHERE id='".$_GET['id']."'")){
    echo 'chkaddshcs';
  }
}
It doesn't give errors, it says rowpostchkaddshcs but he doesn't update the table...
 
     
    