Jump to content

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/115653-general-admin-question/
Share on other sites

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.

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.