I ASSUME THIS IS A TEST PHP SCRIPT
AND WILL NOT BE INCORPORATE INTO YOUR SITE
UNTIL YOU HANDLE ERRORS AND TEST YOUR DATA
AND RESULTS IN THE APPROPRIATE WAY
I would do
PHP Code:
$tempID = mysql_real_escape_string($_GET['id'])
then use $tempID in the query
I would make up the query in a var and use it like
PHP Code:
$query = "UPDATE `articles` SET likes =....."
$result = mysql_query($query) or die.......
then to get the error info replace - starting at die with
PHP Code:
... die ("error liking an article lol sorry<br />\n MySQL error ==>" . mysql_errno() . "<== : ==>" . mysql_error() . "<== <br />\n\$query ==>" . $query . "<==<br />\n ");
others will be here to tell you to use PDO