| [ASK] apa yang salah dengan cek login ane om...??? setelah saya input user dan pass nya,,, selalu muncul pesan "PASSWORD BELUM DIISI" ini scriptnya... --------------------------------------------------------------------- <? $a=$_REQUEST['txuser']; $b=$_REQUEST['txpass'];
if (trim($a)=="") { //echo "USERNAME BELUM DIISI"; echo "<script>alert('Data User Belum Di Isi..!!'); javascript:history.go(-1)</script>"; include "index.php"; exit; }
elseif (trim($b)=="") { //echo "PASSWORD BELUM DIISI"; echo "<script>alert('Data Password Belum Di Isi..!!'); javascript:history.go(-1)</script>"; include "index.php"; exit; }
if ($a=="Admin" and $b=="123") { header ("location: menu.php"); }
else { //echo "PASSWORD BELUM DIISI"; echo "<script>alert('User dan Password Belum Terdaftar (Tidak Cocok)..!!'); javascript:history.go(-1)</script>"; include "index.php"; exit; }
?> --------------------------------------------------------------------------------------- |
|
| Method yang dilakukan sebelum menuju ke Page ini pake apa ? GET atau POST ? |
|
| post om |
|
| $a=$_POST['txuser']; $b=$_POST['txpass']; |
|
| Coba ganti pada bagian ini :
----------------------------------------------------- $a=$_REQUEST['txuser']; $b=$_REQUEST['txpass']; ----------------------------------------------------
Ganti dengan $_POST |
|
| tetap gak bisa om... :'( |
|
| elseif (trim($b)=="") coba ganti jadi if saja |
|
| masih sama kejadiannya om @Suseno Debian Lenny :( |
|
| coba liat halaman form loginnya |
|
| <form action="ceklogin.php" method="POST"> <table> <tr><td>Username</td><td> :</td><td><input type="text" name="txuser" size="15" /></td></tr> <tr></tr> <tr></tr> <tr></tr>
<tr><td>Password</td><td> :</td><td><input type="password" name="txpass" size="15" /></td></tr> <tr><td><input type="submit" value="login" /></td></tr> </table> </form> |
Tidak ada komentar:
Posting Komentar