$login =(trim($_POST['login'])); // login name& [- m9 r! m+ J0 B; T% w
$passwd =(trim($_POST['passwd'])); // login passord: {$ i3 W: }& p+ Q
/**************************************************************************/
5 m" E2 c8 }4 B' l0 w
( E6 _1 v5 n4 h& [ //Validating UserName and Password3 I" O+ G8 _+ c( w- v# i* d
$valid = 1;
G, x6 |" ?; N. L P7 x& X if(ereg(" ",$login)) $valid = 0;) i5 {+ v1 N r: ?0 T
if(ereg(" ",$passwd)) $valid = 0;- `! W5 j$ m% x7 \% I
if($valid == 0)# u x1 S' N# K& O8 }6 g
{
; z/ D& `! V" N X; u# l header("Location:index.php?Err=ad1002");2 T, X% [1 y3 j" h. ]9 m& P
exit; * R9 ^% k" L) R- ^8 v1 w# N
}, S# B& H2 n3 q
( l1 W5 ?+ {( w/ Z8 J3 l /********************checking login***************************************/) Q3 ~. p7 D. N) j
/ M( m3 F. D1 r2 f $sql ="SELECT * FROM partners_admin where pma_login='$login'='$login' AND pma_password='$passwd'";1 D% f% r6 P& q$ `: W" m+ c
$result =mysql_query($sql);
! T' h% w" ?8 X- O echo mysql_error();
, b0 }2 w L2 ~3 v- z if(mysql_num_rows($result)) //login sussess ful7 H. R O9 @' c: E6 \! J9 m- U
3 ]4 Q2 g. }5 ]8 ~+ q' V6 A4 R9 H- Z8 _1 G
------------------------------
`1 A) l2 v' Y: }& ?# ~( G7 r7 M; G& I" _- v
這到底是怎麼驗證登錄的 " w* v+ m6 ]9 d0 U- U
這個驗證和sql沒關係吧 |
|