Admin Panel In Php

Discussion in 'PHP' started by belgin fish, Oct 4, 2009.

  1. #1
    Hey, I'm just wondering how I could make an admin panel, well not even really an admin panel just a page were i can set some settings on my script. All it would do is basically the same as a config.php file. How could i do this?
     
    belgin fish, Oct 4, 2009 IP
  2. toonboon

    toonboon Peon

    Messages:
    20
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I think you can do this in two ways...

    Guessing that you've got the logging in part finished (if not, just say so I'll walk you through that too :))

    Either

    use a database for storing the settings, MySQL is suggested
    http://www.tizag.com/mysqlTutorial/
    
    Code (markup):
    or

    take a look at the file writing/reading functions of php
    http://www.tizag.com/phpT/files.php
    
    Code (markup):
    Im awaiting your reply :)
     
    toonboon, Oct 4, 2009 IP
  3. belgin fish

    belgin fish Well-Known Member

    Messages:
    1,544
    Likes Received:
    72
    Best Answers:
    0
    Trophy Points:
    185
    Digital Goods:
    2
    #3
    thanks, sorry it took so long to reply. I'm just using htaccess for the logging in, and i should be able to get it going from what you've told me. Thanks.
     
    belgin fish, Oct 4, 2009 IP
  4. wd_2k6

    wd_2k6 Peon

    Messages:
    1,740
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You can make any page an "admin-only" page by checking at the top if admin is logged in for authorisation. Then you can create forms of all sorts to modify the relevant settings and update the db, most admin control panels use this technique.
     
    wd_2k6, Oct 4, 2009 IP