php登陆问题[txt保存数据]
分类:威尼斯手机平台

?php if ( $_SERVER [ 'REQUEST_威尼斯手机平台,METHOD' ]== POST ){ // Get UserNames and Passwords. $Logi = file ( users/log.txt ); // Work out how many there are $size = sizeof ( $Logi ); // Break apart passwords and usernames foreach( $Logi as $Key = $Val ) { $Data [ $Key ] = explode ( || , $Val ); } // run through list and see if any match for( $K = 0 ; $K $size ; $K ++) { $user = $Data [ $K ][ 0 ]; $pass = $Data [ $K ][ 1 ]; // If match set cookie and redirect. if ( $user == trim ( addslashes ( $_POST [ user ])) $pass == trim ( addslashes ( $_POST [ pass ])) ) { setcookie ( in , 1 , time ()+ 3600 ); // Start hidden page header ( Location: ); } } echo Login Failed. ; // If you didnt log in show login form } else { ? div style=width:250px divstrongBlack Sheep E-Team Login/strong/div divform name=Login method=post action= ?=$_SERVER [ 'PHP_SELF' ]; ? div align=rightUsername: input name=user type=text br Password: input name=pass type=password br input type=submit name=Submit value=Submit /div /form /div/div ?php } ?

本文由威尼斯在线注册平台发布于威尼斯手机平台,转载请注明出处:php登陆问题[txt保存数据]

上一篇:【威尼斯手机平台】//使用news这么些模型function index(卡塔尔{,以至查看数据库中二个item的专门的学业views 下一篇:name 上传档案在使用者端的名称$myfile
猜你喜欢
热门排行
精彩图文