Main Menu

  Password Checker

The purpose of this script is to accept the password for editing the web page. This script can be either incorporated into an existing page, or simple run alone with standard web page tags around it.

When the password is entered into this page, it sends the entered password over to the edit page. There is a routine there that will test the validity of the password. If it passes, then the edit forms will be loaded. If the password is found NOT to be valid, the user is sent back to the Password Checker.

//                    P A S S W O R D                   //
//                    R O U T I N E                     //
//    --------------------------------------------      //
    This module places a text box on the page
    with the name of the page being edited.
    After filling the password type textbox,
    the user is sent to the edit page where 
    the password is checked.  If it does not
    match the password in the database, the user
    is sent back here.
// Access        
    ("host name","database name","database password");
    mysql_select_db("database name",$db);
        ("select * from page where id = $id",$db);
        While ($myrow = mysql_fetch_row($result))
                $page_title = $myrow[20];

<form action=page_edit.php method=post>
<font face=arial,helvetica>
Editing <font color=#ff0000><b>$page_title</b></font><br>
<font size=2>Enter Password: 
<input type=password name=entered_password 
size=8 maxlength=8></font>
<input type=hidden name=id value=$id>
<input type=hidden name=page_filename value=>
<input type=submit value=go>
//                                                              //
//    ------------------------------------------------------    //

This script can be inserted into an HTML template. However, I usually simply let it live alone by wrapping basic HTML tags around it. Here are the tags you would place above the script:

<title>Password Checker</title>

Place the password checker script here, then follow with:


I will sometimes place the script inside of a table with on cell, setting the table to 100% height and 100% width. Then set the cell to center align and middle valign. The table code would look like this:
<table width=100% height=100%>
<td align=center valign=middle>

put script here