As a final part of a three part series in how to password protect your pages with your new user database that you created from the previous posts. To do this, create a new php file called:
passprotect.php
<?php
include ‘config.php’;
$authorid = $_COOKIE["member"];
$password = $_COOKIE["memberpass"];
$SQLvalidate = “SELECT * FROM `member` WHERE memberid=’$memberid’ AND password=’$password’”;
$results = mysql_query($SQLvalidate);
$numrows = mysql_num_rows($results);
if [...]

