$login =(trim($_POST['login'])); // login name& l5 p+ q2 o& g; g" o
$passwd =(trim($_POST['passwd'])); // login passord8 |" u% i: S# V8 l7 f; R
/**************************************************************************/5 [/ b' @3 I: d0 d% e3 W
; t& } M6 d$ { //Validating UserName and Password( h$ Y a2 z/ Y8 p& b0 A
$valid = 1;; v0 Q* q5 [( F8 M* o8 z4 H* E
if(ereg(" ",$login)) $valid = 0;
& a- m. l% o. Z* C7 r if(ereg(" ",$passwd)) $valid = 0;9 A+ D8 h- {0 f) J+ I0 m
if($valid == 0)
$ R# I8 J' F% p. D6 j+ M/ N; r* \ {% M0 s% R5 ]2 @2 H+ a
header("Location:index.php?Err=ad1002");
; a6 U. d5 r' F# j1 q exit; 6 J. W3 |- ~( c: S- ]5 B
}6 P/ U1 U6 n4 K5 K5 |0 w( R, K
- C5 k# } I2 M9 ?" l( K E /********************checking login***************************************/1 ^" u: I7 p( A2 {; p% }
( L7 Z7 e" F7 k3 t3 Z8 B; n7 C $sql ="SELECT * FROM partners_admin where pma_login='$login'='$login' AND pma_password='$passwd'";
5 _9 p$ I* |2 J% Q. \1 T4 ? $result =mysql_query($sql);
! {+ J: L- k7 f& s echo mysql_error(); - m2 Y5 P- U5 ~
if(mysql_num_rows($result)) //login sussess ful
& s0 v% l* q9 P, z# L: m8 S! I6 [) P, ~* r% j4 k
* K; `1 @& t' Y8 B% O1 m1 o7 n4 Y------------------------------! c& X+ J* N5 J; D7 R
% B" H; r& c& V& F7 p這到底是怎麼驗證登錄的
( X4 A+ \6 B# J2 t7 \! B. l這個驗證和sql沒關係吧 |
|