I'm trying to make a form update data in a table and having a problem with my MySQL knowlage
once a user logs in they have the option to update user data,
so the user name is stored using the $_session arrray,
so basicly
a user logs in with their username, then they goto a form and they can update their data, so i was trying somthing like this
$query = "insert into company where username = '$_SESSION[login]'
(cname,ctype,dname,csize,cinfo,city,street,phone,email) values ('$cname', '$ctype', '$dname', '$csize', '$cinfo','$city','$street', '$phone','$email')";
mysql_query($query) or
die (mysql_error());
$_SESSION[login] = where the username has been stored from the login page
Username = the feild that is being checked
Company = the database table
can anyone help out i'm getting the error:
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'where username = '' (cname,ctype,dname,csize,cinfo,c