applexcore Posted July 20, 2008 Share Posted July 20, 2008 This is a complete "noob" question but I haven't been able to find what I've been looking for. Whats the correct way to add an admin section to a PHP website to do things like to edit forms, change the header image, etc. Of course I'd want it password protected and stuff like that. If anyone could point me in the direction of some tutorials or something it would be greatly appreciated. Thanks in advance. Quote Link to comment https://forums.phpfreaks.com/topic/115653-general-admin-question/ Share on other sites More sharing options...
ratcateme Posted July 20, 2008 Share Posted July 20, 2008 you can do many ways i would use a basic html form and then store the user info in $_SESSION. if you are really security conscious one thing to help stop people stealing the session cookie you can have an IP check in your session. you can use http auth instead of a html form read this ink for info on that http://nz2.php.net/manual/en/features.http-auth.php Scott. Quote Link to comment https://forums.phpfreaks.com/topic/115653-general-admin-question/#findComment-594541 Share on other sites More sharing options...
.josh Posted July 20, 2008 Share Posted July 20, 2008 pretty much the same way you do a login system, except have a field in your db called "level" or whatever, and only allow access to pages if level == "admin" or whatever. As far as adding/editing/deleting, basically all you need to do is first dump all the info you want out and associate it with a form. Make a button or link to specify deleting that row/account/whatever and check if it was clicked and delete where id == posted id or whatever. This tutorial shows how to do all that. All you really need to do from there is put your login and level check on top of that and you're good to go. Quote Link to comment https://forums.phpfreaks.com/topic/115653-general-admin-question/#findComment-594544 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.