RE: [PHP-DB] redirection based on login username

From: Date: Wed, 07 Feb 2001 04:23:37 +0000
Subject: RE: [PHP-DB] redirection based on login username
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-6439@lists.php.net to get a copy of this message
Duh, of course switch hosts. Is this just for some cheesey operation, or is it a serious application. If this is suppose to be serious, then splurge the $10/month for a host with php/mysql. Or, use a DB remotely. As far as redirection.... you don't need to redirect, or use some crazy authentication scheme. All you do is have them go to myaccounts.php. It has a login and password. Query the DB, see if it matches. If it does pass it to the query statement--> SELECT * FROM $agentlogin; And for the different schemes on prices... its not hard to add a coulumn that defines the scheme. Anyways, in a nutshell, get a real host. Use PHP based authorization. Don't do redirects, just query the DB based on the login name. If you there's more than one part/page to the application you can use sessions or set a cookie. No, you do not need to put a cookie on a disk, you set it in the browser when you access the page. -----Original Message----- From: olinux [mailto:olnx@yahoo.com] Sent: Tuesday, February 06, 2001 10:35 PM To: php-db@lists.php.net Subject: [PHP-DB] redirection based on login username *PHP is supported but there is no mySQL access on this host [not sure what the point is... maybe I should just tell them to switch hosts...] I am looking to see if i can connect to a freeservers sql DB [www.f2s.com] *It will be for agents who are logging in, depending on their assigned username they should be directed to THEIR pricing schedule, currently there are three different price schemes *I would like it to be expandable from the current [a new company, they are looking to grow fairly large... naturally] MY THOUGHTS *I only know how to do DB based authentication, so the agent may have to login TWICE [one for PHP redirect, another for apache protected dir. *Cookies might be the best way to go, (agent logs in to a gateway page that reads the cookie value and directs to according page) I don't like this cuz where does the cookie initially get set [give them each a disk with THEIR cookie on it?] *agent ID's could be assigned like this AGENT001 AGENT101 AGENT202 Then the script could direct to up to [10 price schedules, by using AGENT0, AGENT1, AGENT2, get it?] or [100 price schedules, if you extended to the second number AGENT01, AGENT02, AGENT10, AGENT11] etc. each could theoretically have unlimited agents. Just keep adding numbers after the "base" ID So, anyone have any ideas to go about this, I don't think that I can use a DB, unless maybe it was a flat text file... [never worked with those before:)] Thanks Much olinux _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.db (#6439) next »