Forum Moderators: coopster
I need a simple validation form so that a user enters a password into a form, the form then checks the password, if it is correct, it starts a flash movie right below it. If it is incorrect a simple "Wrong Password" should appear within the entry text box. I've been having trouble trying to figure how to get this to work within the same page. Any help or examples would be appreciated.
You could set up the flash movie to play within a php code block, only if the password is validated. So have your form post to itself, and at the top needs to be something like this:
$mypassword = 'whatever';
if($_POST['password'] == $mypassword)
{
$valid = true;
}
Then on your form where the entry box is, check for the true condition:
if($valid)
echo '<input type... yadda yadda>';
else
echo '<input type... value="Wrong Password";
Then where the flash movie goes:
if($valid)
{
// Show movie
}
[edited by: Duskrider at 8:04 pm (utc) on Aug. 3, 2007]