Get ready for BLACK FRIDAY shopping starting in

Forums

This topic is locked

update user info without a search page?

Posted 29 Jul 2002 21:58:16
1
has voted
29 Jul 2002 21:58:16 Angela Zhou posted:
So that after the user log in, they can just click the "modify your profile" button and view previously inputted info, and make changes, rather than search (which may mean inputting username and password again) and make the changes.
is it possible to skip the search page?
Thanks!

Replies

Replied 30 Jul 2002 01:56:29
30 Jul 2002 01:56:29 Owen Eastwick replied:
Create a recordset that retrieves the information from the User details table based on the Username used to log in and stored in the session variable. If you are using the standard UD/MX Login behavior this is MM_Username.

So, something like:

RecordsetName.Source = "SELECT * FROM UserDetails WHERE Username LIKE '" & Replace(Session("MM_Username", "'" , "''"

Then drag the Dynamic text into the Text boxes etc. of your update form in order to pre-fill them with the users current details.

Regards

Owen.

Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo
Replied 30 Jul 2002 04:24:51
30 Jul 2002 04:24:51 Angela Zhou replied:
Thank you, oeastwick. Could you tell me how to create/save session variable?
I created a recordset, and when i removed the filter, a record appeared(but always a same record); when i added the filter back(which was the username), i got a "BOF" error message.
I also have another question: I inserted a new user info into database using a registration form, and then used that new username and pswd to log in, which all worked well, however, i could not find that new user record in database! neither remote nor local! Could you tell me what i did wrong?
Thanks a lot!!!
Replied 30 Jul 2002 13:32:08
30 Jul 2002 13:32:08 Owen Eastwick replied:
To create a session variable:

Session("MySessionName" = "TextValue"

Session("MySessionName" = 5

Session("MySessionName" = MyVariable


To "read" the value of a Session variable:

MyVariable = Session("MySesssionName"

If Session("MySessionName" = "" Then.......


The fact that you were able to log in with the new username and password suggests that the INSERT record worked, so the problem is either with the SELECT statement that is retreiving the recordset or the Username is not being stored in the Session variable or you are not retreiving the username from the session variable correctly.

Does the Information above solve your problem?

Regards

Owen.

Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo
Replied 30 Jul 2002 14:34:35
30 Jul 2002 14:34:35 Angela Zhou replied:
Thank you Owen, you did help.
I tried to set a session variable, but since i am not a programmer and have to do that through application, and the ultradev help does not tell me how to assign a value to the variable(i don't know what value i should assign to the variable), so i am still struggling with it. You may find it very difficult to explain something to a non-programmer<img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>, because we are doing things two very different ways...
anyway i am going to try it and get it done finally!


Itsmicky
Replied 30 Jul 2002 16:55:08
30 Jul 2002 16:55:08 Angela Zhou replied:
Hey I just found an article explaining how to set session variable in Macromedia support centre, i'm gonna solve this problem today<img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>

Itsmicky

Reply to this topic