有興趣玩 Linux 的,請前往 http://linux.vbird.org
記得好好學一下 CSS 喔!
if ( isset ( $_REQUEST['action'] ) ) { // 預計要 login $action = $_REQUEST['action']; if ( $action == 'login' ) { $username = $_REQUEST['username']; $userpw = $_REQUEST['userpw']; $userpw = hash('sha256', $userpw ); if ( $username != $userok ) { $error = 1; $msg = "帳號不對"; } elseif ( $userpw != $pwok ) { $error = 2; $msg = "密碼不對"; } else { $error = 0; } } }
<?php if ( $error == "0" ) { echo "歡迎登入"; } else { if ( isset ( $msg ) ) echo $msg; ?> <form ... /> ... </form> <?php } ?>
還不知道要加啥