Quantcast
Channel: PHP Freaks: PHP Help
Viewing all articles
Browse latest Browse all 13200

Code won't update database

$
0
0
I created a script that is supposed to update some values in a database. However, it won't change anything.
This is my code:
//Edit article
	mysql_query("UPDATE articles WHERE artnum=\"".$_POST['ID']."\" SET art_title=\"".$art_title."\", art_image=\"".$art_image."\", image_caption=\"".$image_caption."\", image_src=\"".$image_src."\", image_src_location=\"".$image_src_location."\", article =\"".$article."\"");
		echo "Article edited.";
I know that it is executed because it is in an if statement and I can see the "Article edited." But I've tried altering the actual query various times, changing the order of the WHERE and SET, etc, using mysqli_query, and nothing has worked so far.
I've checked all my variables, they all exist and I can echo each one of them. I have no idea what to do.

Viewing all articles
Browse latest Browse all 13200

Trending Articles