zobadof Posted December 29, 2009 Share Posted December 29, 2009 I have wrote a code for my members page where you login or register then login to use but the problem is you don't have to register to be able to view the members page you can just type in the url then members.php and will let you view it. I was wondering if someone could write in a code where you cant just type in url - members.php and view it. So that you have to login or register. <p align="center"><a style="text-decoration: none" href="support.html">Customer Service</a> | <a style="text-decoration: none" href="Top%2040.html">Top 40</font></a> | <a style="text-decoration: none" href="home.html">Home</a> | <a style="text-decoration: none" href="videos.php">Videos</a> | <a style="text-decoration: none" href="logout.php">Logout</a> <div align="center"><img src="images/whitenoise.jpg"></div> <title>White Noise | Members</title> <div align="center"><h3>The members area will be updated at a later date, <p>Thank you for your patience,</p> <p>White Noise</p></div> Thanks, Quote Link to comment https://forums.phpfreaks.com/topic/186579-login-register/ Share on other sites More sharing options...
trq Posted December 29, 2009 Share Posted December 29, 2009 There would be literally thousands of tutorials on google that would cover this subject, have you searched there? Quote Link to comment https://forums.phpfreaks.com/topic/186579-login-register/#findComment-985347 Share on other sites More sharing options...
zobadof Posted December 29, 2009 Author Share Posted December 29, 2009 Yes but i just cant find it. If you know how to fix it could you please add the code in for it? Quote Link to comment https://forums.phpfreaks.com/topic/186579-login-register/#findComment-985348 Share on other sites More sharing options...
ignace Posted December 29, 2009 Share Posted December 29, 2009 Sorry, we don't write code for you. If you want to hire someone to write code for you head over to the Freelance section. Here, we help you in locating script errors and give advice on function usage. Quote Link to comment https://forums.phpfreaks.com/topic/186579-login-register/#findComment-985367 Share on other sites More sharing options...
Buddski Posted December 29, 2009 Share Posted December 29, 2009 A simple fix to your problem would be to check if a person is logged in.. if they arent.. give them an error, it they are display the page.. Quote Link to comment https://forums.phpfreaks.com/topic/186579-login-register/#findComment-985369 Share on other sites More sharing options...
zobadof Posted December 29, 2009 Author Share Posted December 29, 2009 Buddski, do you know the code for that? Quote Link to comment https://forums.phpfreaks.com/topic/186579-login-register/#findComment-985371 Share on other sites More sharing options...
Buddski Posted December 29, 2009 Share Posted December 29, 2009 I do know the code for that in MY scenarios... If you have the php ability to create a login/registation form this should be simple for you.. ill give you a hint.. if (isset($_SESSION['logged_in'])) { //YAY!! } else { // Go away } Quote Link to comment https://forums.phpfreaks.com/topic/186579-login-register/#findComment-985377 Share on other sites More sharing options...
ChemicalBliss Posted December 29, 2009 Share Posted December 29, 2009 Yes but i just cant find it. If you know how to fix it could you please add the code in for it? lol, http://lmgtfy.com/?q=php+login+tutorial -CB- Quote Link to comment https://forums.phpfreaks.com/topic/186579-login-register/#findComment-985382 Share on other sites More sharing options...
ignace Posted December 29, 2009 Share Posted December 29, 2009 @CB I'll have to remember that URI Quote Link to comment https://forums.phpfreaks.com/topic/186579-login-register/#findComment-985386 Share on other sites More sharing options...
Buddski Posted December 29, 2009 Share Posted December 29, 2009 CB: Pure Gold.. Hahaha... Quote Link to comment https://forums.phpfreaks.com/topic/186579-login-register/#findComment-985392 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.