need help with password code again...
Posted: Sat Jan 21, 2006 3:39 pm
Hey, I need help with a password code that I got help with prior to this.
The code now is fine, but I need it to make the links, include stuff in that page. When it is clicked.
I just need the HTML links to go away when a link is clicked and view different data.
Thank You
The code now is fine, but I need it to make the links, include stuff in that page. When it is clicked.
Code: Select all
<?
function showForm() {
echo "<form method=post action=/pages/login.php><br>admin id# :<br> <input type=password name=pw><br />
<input type=submit>
</form>";
}
$content = "<html><font size=7>
<p><p>
<a href=/visit_log.htm>Stats</a><br>
<a href=/pages/muotreport/add394958.php>Make Muot Report Code</a><br>
</font></html><br>
<br>
<a href=/pages/muotreport/add39495899.php>Add Muot Report Code</a><br>
</font></html>";
$wrong = "<html><font size=-1 color=red><b>THE PASSWORD YOU ENTERED IS INCORRECT</b></font></html>";
//check if something was entered into field
if(!empty($HTTP_POST_VARS['pw'])) {
if($HTTP_POST_VARS['pw'] == 'MYPASSWORD') {
echo $content;
}
else {
showForm();
echo $wrong;
}
}
else {
showForm();
}
?>Thank You