Re: [請益] 請問寫登入帳號密碼的問題

看板PHP作者 (凝視)時間17年前 (2008/11/04 21:47), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/3 (看更多)
※ 引述《upingo (2009華航桌月曆預購中)》之銘言: : 大家好: : 請問一嚇, : 我享用html+php來寫一個登入網頁 : 大致如下 : ------------------------------------------------ : <? : if ($userid == "guest" && $userpw == "") : Header("Location:index0.htm"); : else : Header("Location:login2.htm"); : ?> <?php $arrayId = array("132","456","798","101"); $arrayPw = array("132","456","798","101"); $flag = FALSE; if(isset($_POST['id'])) for($i=0;$i<count($arrayId);$i++) if(($_POST['id'] == $arrayId[$i]) && ($_POST['password'] == $arrayPw[$i])) $flag = TRUE; ($flag) ? header("Location: http://roga.tw") : die("boo"); ?> : 例如 id:abc passwd:1234 : or id:def passwd:1234 : 要如何在這個 php裡面寫呢? : 感謝囉 : ps index0.htm 是參觀用的網頁 : index1.htm 是首頁 : login2.htm 是登入錯誤請重新登入的網頁 大概是這樣的方法.. -- 凝視著,卻看不見光景。 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.130.223.207 ※ 編輯: roga 來自: 211.23.32.124 (01/15 13:21)
文章代碼(AID): #19459gHx (PHP)
文章代碼(AID): #19459gHx (PHP)