Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating a profile page and...

Status
Not open for further replies.

fusionaire

Programmer
May 20, 2000
67
0
0
US
I have a page where users can update thier profile. Trouble is, right now I have thier &quot;userID&quot; to be the unique identifier in the database when I reference to it in the query statement. I thought about sessionId, but I can't input that value because the client wants to be able to login with thier userid, then goto the profile page to update it, and then update the new information.<br><br>Any ideas?
 
same problem for me here...need to work out for the solution
 
Try using the session variable to reference the userid in the db when they log in (&lt;cfset session.userid=1234&gt;) then when it comes time to update you can do something like:<br><FONT FACE=monospace><b><br>&lt;cfquery name=&quot;update&quot; datasource=&quot;mydb&quot;&gt;<br>update users<br>set favcolor='#form.favcolor#',otherpref='#form.otherpref#'<br>where userid=#session.userid#<br>&lt;/cfquery&gt;</b></font><br><br>Hope this helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top