This is the table strucutre:


This is the code I am using
Code: Select all
$username = '[i]This variable is the session username[/i]';
//conect to database
$db = mysql_connect("$dbHost", "$dbUser", "$dbPass") or die ("Error connecting to database.");
mysql_select_db("$dbDatabase", $db) or die ("Couldn't select the database.");
$query = 'UPDATE `vidaguat_montessori2`.`users` SET `voted` = \'1\', `time` = CURTIME(), `partido` = \'Partido1\' WHERE `users`.username = '$username' LIMIT 1;';
mysql_query($query) or die ('Error, query failed');
}I get this error:
Parse error: syntax error, unexpected T_VARIABLE in /home/vidaguat/public_html/montessori2/vote1.php on line 19
Anyone knows what I am doing wrong?

