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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to display information pertaining to the user only.... 2

Status
Not open for further replies.

TonyU

Technical User
Feb 14, 2001
1,317
US
[tt] Hey all, I need an explanation and code on how I can do this.

I have link on a page that displays an entry results page for the entire day, what I want to be able to do is to ONLY display data entered by the user. In other words, if Bob entered into the database 52 times and Steve entered 17 times then Susan entered 70 times, I only want Bob, Steve & Susan to view their entries...

My problem is that I don't know what to attach my LINK. I'm confused because in other cases, I've attached the recordset ID to the link LINK?id=<%=rsID%>

But in this case I don't what to attach to the link (My Entries)

I guess I could attach a cookie but how?




[tt]&quot;A Successful man is one who can build
a firm foundation with the bricks
that others throw at him&quot;
[/tt]

star.gif
star.gif
star.gif
star.gif

 
You could still just attach an id to the link, in this case, probably the UserID of the person logged in.

 
OK ...
lets see.
there is one way.
you have a field in your table the stores the usernames ?
if so ?
you can do a vwry simple thing.
at the logon page you can set a session variable that
contains the username.
and the for the query you don't have to pass any thing
to the query page.
but in the query page you check that if that session
variable is not empty then you do this :
&quot;SELECT * FROM mytable WHERE fldUserName = &quot; &
Session(&quot;UserName&quot;)
you also can use userID as JuanitaC said insted of
username.
also if you want to use cookie you can do the same.
you shuld not attach the cookie.
but in the query page you can read the cookie and the
get the query by the cookie.
That's it
TNX.
E.T.
 
Thanks
[tt]&quot;A Successful man is one who can build
a firm foundation with the bricks
that others throw at him&quot;
[/tt]

star.gif
star.gif
star.gif
star.gif

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top