sweets Posted July 31, 2010 Share Posted July 31, 2010 Ok. I would like to be able to do this :: http://webdeveloper.50webs.com/js.login.htm in PHP and with a database. I know it may look like a simple login script, but I would like it to redirect to a specific URL based on each user. I.E. "http://example.com/users/index.php" is the login page, and once the user logs in, it would redirect them to "http://example.com/users/username/" Unless someone has a better idea. I know this isn't secure (because someone could just change the url to a different username, and they now have access to that users account.) The only reason I would like to do it this way, is because I have an upload script, and because of the way it uploads, the files are placed in a folder (So username/files is were the files are stored) and I have a file browser (username/browser.php) And I don't know how to display only the files the user has uploaded. (I.E. if I had one main file that the users see once they login, they would all see everyones uploads.) I would forfeit a tiny bit of security if users had there files not publicly visible. (People still have to login to see the files, and they would have to know the URL to a specific username.) So basically what I would like to do, is have a database (I.E. "Users") and have a table in that database with "username" "password" "email" "URL" and the PHP script looks up the database, and checks the username, and the password, and if they match, looks at the URL and sees were its supposed to redirect the user. I have attached the PHP code I have found, and use. If anyone knows how to do this, please let me know! Thanks in advance! Cheers! ------ Anders [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/209424-php-user-login/ Share on other sites More sharing options...
trq Posted July 31, 2010 Share Posted July 31, 2010 Have you got a question? Quote Link to comment https://forums.phpfreaks.com/topic/209424-php-user-login/#findComment-1093472 Share on other sites More sharing options...
sweets Posted July 31, 2010 Author Share Posted July 31, 2010 That was my question... Quote Link to comment https://forums.phpfreaks.com/topic/209424-php-user-login/#findComment-1093477 Share on other sites More sharing options...
trq Posted July 31, 2010 Share Posted July 31, 2010 That is an explanation of what you want to do. You don't state your problem or ask any question. Quote Link to comment https://forums.phpfreaks.com/topic/209424-php-user-login/#findComment-1093478 Share on other sites More sharing options...
sweets Posted July 31, 2010 Author Share Posted July 31, 2010 I updated it... Better? Quote Link to comment https://forums.phpfreaks.com/topic/209424-php-user-login/#findComment-1093482 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.