SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: admin panel

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Dec 2012
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    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
    Posts
    265
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Hi
    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


Bookmarks

Posting Permissions

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