to access the Members Only Pages:"; $submit_action_url = "for_members.php"; $nomatch_error_message = "
Sorry, there are no NSS members
with an NSS number of $_POST[Login_PersonId]
residing in ZIP code $_POST[Login_Zip]!
Please try again.
"; # Check to see if user has authenticated, if not, make him enter NSS # and a ZIP that match a record. # if the Session variable Confirmed_Member not equal to "authenticated", do this section. if ( $_SESSION['Confirmed_Member'] != "authenticated") { # Make sure user has put something in the NSS number and ZIP code input boxes # and check database to see that at least one record matches. If so, set Session # variable Confirmed_Member to "authenticated" if ( !(empty($_POST[Login_PersonId])) && !(empty($_POST[Login_Zip])) ) { # Load up the connection info for the database, and connect. mysql_connect ("database.caves.org", "dbo00009", "G6Td7UtBoHb5Q"); mysql_select_db ("db00009"); # Check to see if an NSS number and U.S. Zip are in a database record and match user's provided NSS number and Zip. $search_string = "SELECT * FROM Membership WHERE PersonId LIKE '$_POST[Login_PersonId]' && Zip LIKE '$_POST[Login_Zip]'"; $query = "$search_string"; $result = mysql_query($query); $number_found = mysql_num_rows($result); # Check to see if an NSS number and ForeignZip are in a database record and match user's provided NSS number and ForeignZip. if ($number_found > "0") { $_SESSION['Confirmed_Member'] = "authenticated"; }else{ $search_string = "SELECT * FROM Membership WHERE PersonId LIKE '$_POST[Login_PersonId]' && ForeignZip LIKE '$_POST[Login_Zip]'"; $query = "$search_string"; $result = mysql_query($query); $number_found = mysql_num_rows($result); if ($number_found > "0") { $_SESSION['Confirmed_Member'] = "authenticated"; } } } # Ok, either user hasn't entered anything in the input boxes, or he didn't match a record # for whatever reason. Give him the search boxes again, (and a nice not saying that no records # matched, if his input failed.) if ( $_SESSION['Confirmed_Member'] != "authenticated") { ?>


NSS Number
Zip Code