I think the below code will do the password If I can figure out how to direct this program to the the main program if the password is correct. Can someone help me with the link, please?
<?php
mysql_connect(localhost,root,"");
mysql_select_db(entrydb) or die( "Unable to select database");
if(!empty($_POST["submit"]))
{
$password = $_POST['password'];
$expdate = $_POST['expdate'];
$query="SELECT password, expdate FROM entrydata Where password='$password'";
$result=mysql_query($query);
if(mysql_num_rows($result))
{
echo "<form action='#' method='post'>";
echo "</form>";
}
else{echo "Access denied<br />";}
}
?>
<form method="post" action="#"><br />
<input type="text" name="password"/><p>
<input type="submit" name="submit" value="enter password"/>
</form>