pranshu82202 Posted August 30, 2011 Share Posted August 30, 2011 I am working with a insert query... $query="INSERT INTO user_info_more (website) VALUES ('".$website."') WHERE id='$_SESSION[id]'"; mysql_query($query) or die ('Unable to register an account with following details 1'); but the output is " Unable to register an account with following details 1" Basically i have a row with 6 cloumns in mysql database in which only the id column and name column is filled... Now i want to insert $website in the "website" column of the database... Neither i can update as the website column initially is null... I do not know what to do.... A lot of cnfusion Quote Link to comment https://forums.phpfreaks.com/topic/246070-insert/ Share on other sites More sharing options...
Pikachu2000 Posted August 30, 2011 Share Posted August 30, 2011 From the looks of your code, you don't want to INSERT a new record, you want to UPDATE an existing one. Quote Link to comment https://forums.phpfreaks.com/topic/246070-insert/#findComment-1263732 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.