bm4499 Posted November 2, 2008 Share Posted November 2, 2008 Hello, Does anyone know how to deal with login? Suppose I have detected a user logged in correctly with his User-id & password and thereafter a PHP page needs to be loaded BUT, however, a user must not be able to type the url of the php-page that must be access after proved user-id & password. How can I reach that? with other words: - after login is approved then http://www.myweb.com/provedusers/launchthis.php must be started AND without the right user-id & password the url http://www.myweb.com/provedusers/launchthis.php must be disabled.... Is this possible and how can this be reached? thanks in advance, perry Quote Link to comment https://forums.phpfreaks.com/topic/131079-php-login-page/ Share on other sites More sharing options...
corbin Posted November 2, 2008 Share Posted November 2, 2008 http://www.w3schools.com/PHP/php_post.asp http://www.tizag.com/phpT/postget.php http://www.tizag.com/phpT/phpsessions.php Quote Link to comment https://forums.phpfreaks.com/topic/131079-php-login-page/#findComment-680609 Share on other sites More sharing options...
auro Posted November 7, 2008 Share Posted November 7, 2008 Hi buddy! You can use mysql or some database to store username/password and other necessary information about users. Further the sessions can also be stored... You need to know a good deal about databases for that friend. Quote Link to comment https://forums.phpfreaks.com/topic/131079-php-login-page/#findComment-684477 Share on other sites More sharing options...
legohead6 Posted November 8, 2008 Share Posted November 8, 2008 yes, the best way is to create a session with the username of the user, then on pages that require being logged in you start the page with if(empty($_SESSION['username'])){ echo "Please Login"; exit(); } Quote Link to comment https://forums.phpfreaks.com/topic/131079-php-login-page/#findComment-685522 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.