Evening all,
I've ran into a dead end, my php isnt the best.
What i am trying to do is get a simple voting script working.
User clicks vote up.. it updates the table +1 user votes down -1. Simple enough.
However this is what i have so far...
<?php
if(isset($_POST['voteup']))
{
$sql = "UPDATE movies SET ratings = increment + 1 WHERE id = '".$_GET['id']."'";
mysql_query($sql);
}
?>
<a href="?voteup">VOTE UP</a> | <a href="?votedown">VOTE DOWN</a>
<?php
if(isset($_POST['votedown']))
{
$sql = "UPDATE movies SET ratings = increment - 1 WHERE id = '".$_GET['id']."'";
mysql_query($sql);
}
?>
Error i get is:
Parse error: syntax error, unexpected T_STRING on line 23
As you can see there is only 15 lines here?
Extra info:
the page is called watch.php?id=15
vote will be near bottom of page.
table has a column called ratings set as INT (32)
If you need anything else please let me know!