$login =(trim($_POST['login'])); // login name
! x% u$ a& e$ ^' V5 V' O6 l $passwd =(trim($_POST['passwd'])); // login passord T# L4 q Q. ?
/**************************************************************************/
1 `0 K+ }2 g2 H7 j/ B( r; ]% m8 w% v) s9 d
//Validating UserName and Password
( W. r8 o( x+ q4 r- C' {8 O $valid = 1;& Z: b. d' p, c7 B1 C. y
if(ereg(" ",$login)) $valid = 0;
* e. b9 U! {+ i' p if(ereg(" ",$passwd)) $valid = 0;
1 m5 Y. B5 ^+ X) p if($valid == 0)$ l1 X1 T- d I8 K/ n$ W+ ~
{. i* e! j \) `2 C' n. Q
header("Location:index.php?Err=ad1002");
% ?! f3 J3 i% W7 O! _& m8 @ exit;
1 _7 U/ z. c3 c6 g4 p }
; m; k! C) |* S" W; b+ c# z. c1 `9 {; L; |& s7 D
/********************checking login***************************************/
/ g0 E/ W+ s; v( r, W, ]7 V( n+ b% @& \
$sql ="SELECT * FROM partners_admin where pma_login='$login'='$login' AND pma_password='$passwd'";
- u+ t, E. h) o' Q+ C: o0 r( A& k $result =mysql_query($sql);
+ A* c, F: q+ O( O echo mysql_error(); 8 [$ n" D6 J; E0 N" N9 ^- u
if(mysql_num_rows($result)) //login sussess ful6 M# c0 F- k a2 O. s& f+ V
7 S. d; x+ z) {% T: i0 m: z0 P1 b+ L }. f3 Q2 t# ^, I: Y2 q4 i
------------------------------
6 v7 i( b0 Y, V8 }5 u& m9 P( p" D- [6 T$ A4 o/ f
這到底是怎麼驗證登錄的
7 P3 H8 J+ W2 t) [, @這個驗證和sql沒關係吧 |
|