School Map:  Home / Enroll $ Student Records; Class  
$ News @ LIVE Tech Radio * Support/FAQ | Store | FORUMS

Class / Forums / homeroom Refresh the current page basic assignment #5
 

 (#289 2006-02-23 16:33:16) Post Reply

anti
Need To Set


Enrolled: Feb 2006
Posts: 11
AP: 1



<html>
<title>Basic TO-DO ASSIGNMENT:#5 Anti</title>
<body>
<center>
<?
/*
TO-DO ASSIGNMENT: Write a script to submit a username and password to enter a page.
If the username and password does not match the variable hardcoded in the script show
the login form again with an error message. The password field should be private so
that as you type you'll see ****. This should all be one self-contained script
with NO include() or require() files.
*/
//setup if statment
if($login_form == true )
{
if(
$username == Anti && $password == 123456)
{
print(
Welcome $username you are logged in </body></html>);
exit;
}
else { print(
Username Or Password Invaild Plese try again<p>);}
}
?>



<table border=1 cellspacing=5>
<FORM method=POST action=ass5.php>
<input type=hidden name=login_form value=true>
<tr><td>Username:</td><td><input type=text name=username value=\ size=20></td></tr>
<tr><td>Password:</td><td><input type=password name=password value=\ size=20></td></tr>
<tr><td></td><td> <input type=submit value=Login> <input type=reset value=Reset></td></tr>
</FORM></table>
</center>

</body>
</html>


 

 

View Previous Thread
Print this page Print This Page

View Next Thread

School Map:  Home / Enroll $ Student Records; Class  
$ News @ LIVE Tech Radio * Support/FAQ | Store

Advertising | Link To Us | Privacy 
Copyright 2000-2002 Script School Productions / KMR Enterprises 
No part of this website may be reproduced, copied and/or distributed in any medium 
without express written permission