What should be happening with this PHP script?

  • Thread starter Thread starter Humza
  • Start date Start date
H

Humza

Guest
I am trying to go over some PHP lessons. It is a bit out dated but it is the only site i have found that i can understand.
Basically:
This is the starting page of this part of the course PHP and HTML forms on the same page - http://www.homeandlearn.co.uk/php/php4p1.html
This is my code:
PHP in the head section:

if (isset($_POST['Submit'])){
$username = $_POST['username'];
if ($username == 'letmein'){
echo ("Welcome back friend!");
}
else{
echo("Your not a member of this site!");
}
}
and the form:

<form name="form1" method="POST" action="basicForm.php">
<input type="text" value="username" name="username">
<input type="Submit" name="Submit1" value="login">
</form>

when i load the page and enter the right/wrong user name, should i get the welcome/not a member message or not as i am just getting is the form with the value 'username' in the box. The page just looks like it is reloading.

Hope this makes sense
Thanks in advance
 
Back
Top