I don't understand why I've got an error
"Erreur de syntaxe près de '1' à la ligne 1"
(sorry I'm french ...)
Here is my code
$post_id=$_POST["del_id"]; $post_photo=$_POST["del_photo"]; $query=mysql_query("DELETE FROM produits WHERE id='$post_id'"); $ok=mysql_query($query) or die(mysql_error()); if ($ok) { $small=$post_photo."_small.jpg"; $large=$post_photo."_large.jpg"; if (file_exists($small)) unlink($small); if (file_exists($large)) unlink($large); }
However, the mysql delete works fine but my two jpg's still here due to error.