TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 05-25-2009, 06:04 PM   #1 (permalink)
The Contributor
 
Join Date: May 2008
Posts: 36
Thanks: 5
Kay1021 is on a distinguished road
Default User login directed to specific page

Hi

I was wondering if anyone knew of any site that could help me. I am looking to create a secure site where at the beginning the user is prompted to enter a username and password there is 1 admin and then say 8 users. When each user has entered the correct information they are taken to a page specifically for them...and they are not allowed access into any of the other 7 users' pages. However the one admin can view all 8 pages.

I'm just wondering if anyone could guide me. Even if you've got a tutorial that does this sort thing or how i could modify one....i'm just kinda stuck.

Thanks
Kay1021 is offline  
Reply With Quote
Old 05-27-2009, 09:06 AM   #2 (permalink)
The Contributor
 
Normo's Avatar
 
Join Date: Oct 2008
Location: UK
Posts: 30
Thanks: 0
Normo is on a distinguished road
Default

Thats not really the most efficient way of creating a user based site, think if you had 100 users, would you like all of them to have a page each. You would have one page for the users, in which the content would change dynamically depending on the user.

However to do what you asked, one solution might be:
PHP Code:
$con mysql_connect(localhost,username,password) or die (mysql_error());
mysql_select_db("my_db"$con);
$result mysql_query("SELECT * FROM Persons");

while(
$row mysql_fetch_array($result)){
   
$userPage $row['UserPage'];
}

header('Location: $userPage'); 
This is part of the login code. When the user signs up, you would need to create a new page with the appropriate content then put the url to that page in the database along with the username and password. That way when a user logs in you can retrieve the url and redirect them to their own page.

Like I said, a single page with dynamic content would be better for a site with multiple users. :)
Normo is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create a gallery class Tanax Advanced PHP Programming 25 02-19-2013 04:25 AM
Easy to Modify Login Script with Hierarchical User Permissions and XML Account File Wildhoney Script Giveaway 4 05-04-2011 06:11 AM
Planning your project Village Idiot Absolute Beginners 13 06-17-2009 02:46 PM
how to block a user from viewing a specific page sarmenhb General 9 04-25-2008 03:02 AM
user login page sarmenhb General 4 01-22-2008 09:33 AM


All times are GMT. The time now is 07:48 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design