CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 help!! pass variable other then user id to filter

Print topic Send  topic

Author Message
Sarah
Posted: 02/07/2002, 8:49 AM

I am very new to this and tryng to make a program using php. Once a customer logs in they should be sent to a grid showing records that are for thier company. The records are on a table called documents. I set up the database table pretty much like the ones on the events demo, so the user id and the company names that match the user is on a table I called customer, How can I filter these records by a company name. I'm Lost :(
Thanks in advance for your help!
spaceclown
Posted: 02/07/2002, 11:27 AM

This is a guess but I think it might help.
This is based on the assumption the the table that holds the user login also includes the company name or ID.
Do a custom login on your login page. It's under the events tab. In the session besides "userrights" add "company" or company_id, however you set it up. Then follow make a redirect page that you can put in the login forms Form Action. On the redirect page in the Open page event put
if Session("UserRights","company") = 1,companyname then response.redirect("company.asp") else
if Session("UserRights","company2") = 1,company2name then response.redirect("company2.asp") else
if Session("UserRights", "company") = 2,companyname then response.redirect("company.asp") else response.redirect("login.asp" )

hope this help, more description on redirect is available by this article
http://www.gotocode.com/art.asp?art_id=55&

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.