(1) ¦sÀÉ: staff.sql create ___________ ablmcc; create ___________ staff( char(10) not null, char(10) not null, varchar(20) not null, primary key(staffid) ); insert into staff values("peter","1234","Chan Tai Man"); insert into staff values("mary","abcd","Cheung Ma Lee"); (2) login.php
(3) login-submit.php login-submit.php?name=_______&pwd=______ // submit(name,pwd) 1. "; echo $_GET["_____"] . ""; ?> 2. ______
"
?>
3. mysql_select_db("__________",
mysql_connect("__________", "root", "rootpass"));
$sqlstr="select * from staff where staffid='__________'";
// echo "sqlstr = $sqlstr
";
$result = mysql_db_query("__________", $sqlstr);
$rs = mysql_fetch_row($result);
4. if(__________==$pwd)
echo "Login Successfully!
"; else echo "Incorrect User ID or Password!
";