|
| |
|
|
winter
Posts: 174 Joined: 3/12/2002 From: Toronto ON Canada Status: offline
|
how to link db to login to display records of user only - 8/6/2007 0:06:31
Is there a simple way to set up a page (using FP2003) that shows only the data base records for the person who has logged in? I have the Spooky Login system nicely installed. There is one other database in the fpdb folder and 10 forms post to this data base using the same fields. In each of the forms I have placed a hidden field using Name: Lastname and Value: <%=Session("x_Lastname")%> (from the login system). When they have logged in, I would like the user to be able to go to a page where they can find all of their own entries (3-4 fields per entry) to date. (it’s like a diary) I tried using DBR wizard but then each person would need their own page. Is it possible to have one page act like a ‘session’ and just show results for the person logged in? Guidance appreciated!
|
|
|
|
winter
Posts: 174 Joined: 3/12/2002 From: Toronto ON Canada Status: offline
|
RE: how to link db to login to display records of user ... - 8/7/2007 22:49:54
quote:
fp_sQry = "Select * from table where ID="&Session("UserID") Thanks so much Spooky, but I get an error message. Here is what I did... Insert /Database/Results - using wizard Select DB - mydatabase Custom Query/Edit Insert Parameter /Name /Enter- ::UserID:: At this point I paste in the code from you fp_sQry = "Select * from table where ID="&Session("UserID") but get the error message "the Server encountered an error..." I then tried pasting that expression in the code view of the page where it says in red fp_sQry="SELECT * FROM Results" but that did not work either. Any suggestions? With Appreciation Carolyn
|
|
|
|
winter
Posts: 174 Joined: 3/12/2002 From: Toronto ON Canada Status: offline
|
RE: how to link db to login to display records of user ... - 8/15/2007 9:35:25
Hi Spooky, Your suggestion makes good sense to me and i have been trying for days to make it work. I tried using UserID and in the code area put in this: fp_sQry="SELECT * FROM Results WHERE (UserID= '<%=Session(""x_UserID"")%>')" and either get page not found once published or the following message when i take out the double quote to make it a single: "the contents of a FP component have been modified. THese will be changed when you press Save." ...and of course they are! I tried putting that expression into the DRW directly either as a query or in the section for other criteria but that does not work either. Any other ideas? What am i missing? Thanks so much, Carolyn
_____________________________
" All that matters is what we do for each other" Lewis Carroll
|
|
|
|
winter
Posts: 174 Joined: 3/12/2002 From: Toronto ON Canada Status: offline
|
RE: how to link db to login to display records of user ... - 8/15/2007 22:04:17
quote:
fp_sQry="SELECT * FROM Results WHERE (UserID="&Session("UserID")&")" Hi Spooky, I tried this but when i type this into code view still get the error message: "the contents of a frontpage component have been modified. These contents will be over written when you save the page." - or "the server encountered an error when i insert it in the wizare panel for edit query. I do notice in the DRW steps that when you are asked to select a db/ the main one i am working with is in the list, but the login db is not in the list. The login DB i know is there and working fine, but i don't know why it would not show in the list. ALso when i check tools/site parameters/database connections - the login db is not on that green checkmarked list. It's like a ghost really ( very spooky if you ask me). Could this be the problem? Your thoughts appreciated. By the way, in working through this i have read your tutorial on DRW and really, - it is very helpful.
_____________________________
" All that matters is what we do for each other" Lewis Carroll
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|