mywebradio12
New Member
- Messages
- 1
- Reaction score
- 0
- Points
- 0
hi all
why does this piece of code not work :s
<?php
mysql_query("UPDATE `articles` SET likes = likes+'".$_SESSION['userid'].",' WHERE id = '".mysql_real_escape_string($_GET['id'])."'") or die('error liking an article lol sorry');
?>
what it needs to do is simple:
adding "<user id number>," to the existing table row "likes".
nvm: with the comma to separate the id's.
Thank you for your time in advance.
Kind Regards,
mywebradio12
why does this piece of code not work :s
<?php
mysql_query("UPDATE `articles` SET likes = likes+'".$_SESSION['userid'].",' WHERE id = '".mysql_real_escape_string($_GET['id'])."'") or die('error liking an article lol sorry');
?>
what it needs to do is simple:
adding "<user id number>," to the existing table row "likes".
nvm: with the comma to separate the id's.
Thank you for your time in advance.
Kind Regards,
mywebradio12
Last edited: