|
-
July 15th, 2009, 05:36 AM
#1
User-specific web page access...
Hi All...
I've created a few web pages, and currently some of these require login. A person logs in using username and password; username is in the form of ****###, where ****=year of joining, and ###= unique member ID (both these are known by the user already). An example username is 2003396 (year of joining: 2003, and member's ID: 396).
Now, what I want to do is to control it such that those with joining year as 2003 are directed to page A on login, those with joining year 2004 are directed to page B on login, and so on...
I was wondering if you could help me out with how I could go about this... [login script I'm using is in PHP].
Do I need to create separate databases for each year? Or is there a way (using PHP) to say "If first four characters of username = 2003, then go to Page A" and so on?
Appreciate any help...
Thanks in Advance!!! .
Tunçay
-
July 15th, 2009, 07:54 AM
#2
Re: User-specific web page access...
Sounds like your username idea is a little bit off. Why don't you just create one table in your database named users. Then, you can have all sorts of information. Maybe use the following columns.
timestamp,datecreated,lastlogin,username,password(hashed)
Are you using sessions to control user data across pages? If not, you need to be. Remember to supply a session name before starting each session so that their is no data overlap.
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|