SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2010
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Advanced PHP Tutorial

    So I understand the basic concepts of PHP and MYSQL but I'm having trouble combining the two to make Admin Panels / Website Backends. I was wondering if anyone knew of any good tutorials that covered specifically that: creating admin panels / user backends / website backends.

  2. #2
    SitePoint Addict
    Join Date
    Dec 2005
    Posts
    336
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    What does an Admin back end consist of?
    - User Authentication & possibly permissions of that user
    - Forms, validation
    - CRUD - Create, Retrieve, Update, Delete

    Google should give you many tutorials for each at this point. You just need to combine each

  3. #3
    SitePoint Enthusiast
    Join Date
    Jun 2010
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    And this is where I'm having the most trouble is combining the pieces. See right now when a user logs in I am using a javascript redirect to bring them to the internal page, which just doesn't seem right to me. That's why I was hoping a tutorial might show me a better way to go about this.

    Yeah a website backend just consists of user authentication and content editing 'simple' as that, but getting everything to work is not so simple :/

  4. #4
    SitePoint Addict
    Join Date
    Dec 2005
    Posts
    336
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I would say google, if you haven't already, but I only found a few in a quick search:
    http://www.vdesignourweb.com/cmsphps...dminpanel.html (basic)
    http://www.phpwebcommerce.com/shopping-cart-admin.php (better)

    That's a start, but further would be thinking about what will the admin look like, user actions, then build a simple panel
    Code:
    Login page - page=login 
     - if valid set session variable
     - redirect to admin page - page=admin
    Admin page
     - shows list of admin functions
     -- add page - page=admin?action=add-page
     ---- blank form
     ---- if valid on submit, enter into db
     -- list of current pages to edit/delete - page=admin?action=view-pages
     ---- if edit, go to form populated with db values - page=admin?action=edit-page&id=1
     ---- if valid on submit, update db
     ---- if delete, delete from db  - page=admin?action=delete-page&id=1
     -- user info - page=admin?action=edit-user&id=1
     ----- show form with user infomation
     ----- if valid on submit, update db
     - user logout - page=logout
     ----- destroy session
     ----- redirect to login/home page
     
    Admin functions can be called via switch statement based on the url
    Here I put possible urls to give you an idea on how this could look - also basic sql for each:

    page=admin?action=add-page - on valid submit :
    Code:
    insert into pages values(x,y,z)
    page=admin?action=view-pages :
    Code:
    select * from pages
    page=admin?action=edit-page&id=1 :
    Code:
    select * from pages where id = 1
    page=admin?action=delete-page&id=1 :
    Code:
    delete from pages where id = 1


Tags for this Thread

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
  •