Forums
This topic is locked
Filtering Records based on Session
25 Jun 2007 16:49:38 Nig NA posted:
Hi all, great forum!I was wondering if someone could help me please?
I have a recordset which contains the value of only one field that I want to display based on session data! The application for this is showing a price to a customer based on their customer type!
Both variables below belong to the same database table and are found in the session variable Customertype which would equal either wholesale or retail
1st Variable = Retail and should <b>only show the cprice field</b> in the database
2nd Variable = wholesale and should <b>show price2 field and the cprice field</b> in the database
I want to show both prices on the page only when the value = wholesale
I figured the easiest way to do this would be to hide the price2 field and when the session customertype=wholesale simply show the field! But don't know how!
Please help, thanks heap!
Replies
Replied 25 Jun 2007 19:55:20
25 Jun 2007 19:55:20 Simon Bloodworth replied:
based on that the user is logging in and from this will create the session for whether they are retail or wholesale?
what you could try is something like:
If Session("Sessionnamehere" = "Retail" Then
put html to display retial price here
Else
put html to display both wholesale and retial price
End IF
but give you somewhere to start
Simon
DWMX 2004 | ASP | VBScript
what you could try is something like:
If Session("Sessionnamehere" = "Retail" Then
put html to display retial price here
Else
put html to display both wholesale and retial price
End IF
but give you somewhere to start
Simon
DWMX 2004 | ASP | VBScript