Idea to implementation: Password protect the Admin site and Use PHP Upload

In this article, Matt continues his write up of his brief to build an artists' portfolio site. The customer requires an administration area of the site to upload, delete and rename images that are displayed on the front-end of the system. Matt teaches you how to build a password protected admin area using PHP and MySQL, and teaches you how to use the PHP Upload Extension to allow uploading and management of the image files.

$2.79
- OR -

Overview

Table of Content:

  • The Uploads Page
  • Advanced Upload Options
  • Password Protection
  • Database Additions
  • The Login Page
    • Testing the Page
  • The Redirection Code
    • Improving the Check
  • Using the Login Name
  • The Logout page
  • Adding Users

Matt Machell

Matt MachellA man of many talents, Matt has been a web designer, technical editor, and jewellery picker. He is currently on contract for the Birmingham City University, producing pages for research centres.

He has tech-edited a dozen books on web design and development for glasshaus, Apress and Sitepoint.

He likes music with loud guitars and games with obscure rules.

His website can be found at: http://www.eclecticdreams.com

He lives in Birmingham with his girlfriend, Frances, and a horde of spider plants.

See All Postings From Matt Machell >>

Reviews

Set cookie doesn't work either

August 15, 2003 by loko 51

Apologies for my first review... BUT

set cookie code at line 32 just won't create the cookie...  the cookie ain't created, so the index.php keeps sending you back to login.php even if ya entered a valid username and password in the login.php page

 

RE: RIP OFF!!

August 15, 2003 by Matt Machell

Hi, if you're having problems with the code, drop me a mail, I'm more than happy to help out with any problems you might encounter. The most likely reason for a cookie not being set is that you have some whitespace somewhere before the PHP code, preventing the cookie from being set.

You must me logged in to write a review.