SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: admin panel

  1. #1
    SitePoint Member
    Join Date
    Dec 2012
    0 Post(s)
    0 Thread(s)

    admin panel

    hallo ,i want to ask you ,is it possible to make admin panel for my site without having a registration/login option for the site
    i mean i want users to have thi option to leave comments without asking login ,but i want to make admin panel also so i can delete some comments if it`s needed.but how to tell php that i`m admin without having login form ?

  2. #2
    SitePoint Addict
    Join Date
    Apr 2011
    2 Post(s)
    0 Thread(s)
    You can use $_SESSION.
    Create a page with a form field for password. The form sends data to a php file in which you have defined a variable with your password.
    If the password added in form is the same with the password in variable, sets a session for logged admin.
    Then, make your script to display "delete" button, and to can delete the comments only if the session with logged admin is defined.
    Use session_start(); at the beginning of php files.
    Free: Web Programming Courses HTML, CSS, Flash
    Web Programming: AJAX Course and PHP-MySQL Course video Lessons
    Good JavaScript and jQuery course for beginners


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts