Simple password access (made a booboo)

Soldato
Joined
9 Mar 2010
Posts
2,841
Right, making a single page website for a friends wedding - more details in addition to what they could fit on the invite.

Problem is a misunderstanding has led them to putting just the password on the invite rather than the username and password that I had set just using htaccess.

Option 1) Leave it as is - the username and password are the same repeated but this will obviously confuse people when they're only getting told a "password"

Option 2) Create something in PHP

Option 3) Ask here to see if anyone has a quick fix they've already created in PHP or other that requires just a password to access a page.

Thoughts?

(In before "The time taking to write this in PHP is probably less than the time taken to write this post" :P )

Cheers guys,
Roy
 
id make the username field a hidden field and pre-populated and then just show the password field for them to enter it and submit...or, dont have the username on the form and on the page that you're posting to, fill in the username in code there.
 
Gone with this.

<?php
$password = $_POST['password'];
if($password == "passwordhere")
{
include("wedding.inc");
}
else{?>
<form method="post" action="index.php">
<h1>Password</h1>
<input type="text" name="password"></input>
<input type="submit" name="Enter"></input>
</form>
<?}?>
 
Back
Top Bottom