Below is the php code to create the table for your password protection script. Put in your username, password and database name. Upload it to the web server and run it.
<?php
$user="yourusername";
$password="yourpassword";
$database="yourdatabase";
mysql_connect(localhost,$user,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query="CREATE TABLE protect (
id INT( 6 ) NOT NULL AUTO_INCREMENT ,
username VARCHAR( 20 ) NOT NULL ,
password VARCHAR( 20 ) NOT NULL ,
PRIMARY KEY ( id )
)";
$result = mysql_query($query);
if( mysql_field_table($result,"id") ){
echo "Database table created";
} else {
echo mysql_error();
}
mysql_close();
?>