ok I have a login program and this is the code to display a username
<?=$_COOKIE['username']?>
I have a table in my database for each username. I need to update each specific users table but I can't figure out how to add the username to it.
This is what I have so far
<?
$connection = mysql_connect("localhost","dbuser","dbpass") or die("Couldn't connect to server.");
mysql_select_db("dbname");
mysql_query("UPDATE =$_COOKIE['username'] SET count=count+1 WHERE id=1");
Header("Location: $url");
?>
If you notice I just put the code from above into the part where the table name would go in the update line.
This is the error I am getting. . .
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/undangle/public_html/track.php on line 10
Any Suggestions. . .Thanks in advance
Oh also lets say the users name is bob If I manually put bob in place of =$_COOKIE['username'] then everything works fine. so i know the code works i just need to get it to select the username