driz Posted June 19, 2008 Share Posted June 19, 2008 How would you create this: http://leomancini.net/pre/It would need to block access to a site directory! Thanks. x Link to comment Share on other sites More sharing options...
zppblood Posted June 19, 2008 Share Posted June 19, 2008 From what I see it's just a basic login form.1. Choose how many login usernames/passwords you want2. If it's a few you can just insert them into the php file to check login, or if you want more then you can use a database like MySQL3. Create HTML login form with the required fields to fill out for the user, typically password and/or username (more secure with username, and easily customize based on usernames too)4. Learn about sessions and cookies5. Check to see if the sessions and/or cookies are set and the values in them meet with what you are wanting them to have.6. If they are not set, show login form unless the user submitted the form, then you will check the information they entered.7. If they match, set sessions/cookies, if not show login form or message saying they can't log in with what they entered. Link to comment Share on other sites More sharing options...
driz Posted June 19, 2008 Author Share Posted June 19, 2008 Can you point me to some code I can use and develop? Because I want to quickly create one to block out a directory while I work on a site. Thanks. x Link to comment Share on other sites More sharing options...
Ingolme Posted June 19, 2008 Share Posted June 19, 2008 I recommend you actually try to learn PHP. the point here isn't to give you everything done, it's to teach you and have you learn how to use web technologies (we're on W3Schools). This is a really simple thing to do, I guess you're not very familiar with PHP.Here's the PHP tutorial and This Section will give you a start on what you have to do. Link to comment Share on other sites More sharing options...
zppblood Posted June 19, 2008 Share Posted June 19, 2008 If you can use .htaccess files, check this out to redirect a directory to a login page.http://www.javascriptkit.com/howto/htaccess7.shtmlLoginhttp://www.phpeasystep.com/phptu/6.html Link to comment Share on other sites More sharing options...
driz Posted June 19, 2008 Author Share Posted June 19, 2008 bummer well i wasn't really wanting to create something over-complex, just something that could keep my site secure, and allow me to show selected people. very much like how the linked site above has done. can anyone please share code? thanks v.much. x Link to comment Share on other sites More sharing options...
zppblood Posted June 20, 2008 Share Posted June 20, 2008 Read the tutorials at W3Schools, they are good for beginners, and you should be able to create a pretty basic one once you have read it. After you've done that, you can go to php.net and read the manual there to get a better understanding about php. Link to comment Share on other sites More sharing options...
justsomeguy Posted June 23, 2008 Share Posted June 23, 2008 There's a login tutorial in this thread also:http://w3schools.invisionzone.com/index.php?showtopic=12509 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.