Hey everybody !
I haven’t coded in PHP for years, now I wanted to get back and I started to make some basic Wargames.
But for some reason,when people click the Submit button nothing happens.
Check the code.
Form Area:
<p><input type="password" name="pwdfield" />
<input type="submit" name="submitbtn" id="submitbtn" value="Submit" />
PHP Area:
[code]<? function validate()
{
if($_POST[‘pwdfield’] == ‘n3wb13’)
{ echo “good Job cake!”; } else { echo “Start learning from the begginning.”; }
}
$pwd = $_POST[‘pwdfield’] ;
if (isset($_POST[‘submitbtn’]))
validate ();
?>[/code]