![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programmer
Join Date: Jan 2005
Location: Albany, NY
Posts: 43
Rep Power: 0
![]() |
Another MySql question...
Alright, so when my user signs up he inputs some information that gets stored into my table called user_needed. Only about 1/2 of the columns are filled up when they register, and there is another 1/2 that is left blank. Now once the user registers and the session is set, they can go to page edit_profile.php and fill in the extra information that is in my table (information that isn't important enough to make them fill out upon registering). I can't figure out how to insert that information into the same row as all the other information. I thought it would be something like:
$username = $_SESSION['username']; mysql_query("INSERT INTO user_needed WHERE username='$username' ('location', 'gender', 'website_name') VALUES('$location', '$gender', '$website')") or die(mysql_error()); ... needless to say it doesn't work. |
|
|
|
|
|
#2 |
|
Professional Programmer
Join Date: May 2005
Location: Bad Nauheim, Germany
Posts: 436
Rep Power: 4
![]() |
Read up on SQL... INSERT does just what it is meant to... insert a tupel into a relation (row into a table). You want to try UPDATE.
__________________
-Steven "Is this a piece of your brain?" - Basil Fawlty |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|