Ec (2); php user password modification code & lt ;? Php & nbsp; @ session_start (); & nbsp; require_once (& quot ;.. incring_admin.php & quot;); & nbsp; require_once (& quot ;.... incconnect. php & quot;); & nbsp; require_once (& quot ;.... adm script ec (2); script
Php user password modification code
@ Session_start ();
Require_once ("../inc/ring_admin.php ");
Require_once ("../inc/connect. php ");
Require_once (".../../admin/inc/function. php ");
Ring_login ();
$ Pwd = get_value ('pwd', 'post ');
$ Pwd2 = get_value ('pwd2 ', 'post ');
$ Pwd3 = get_value ('pwd3 ', 'post ');
$ SQL = "select * from gx_member where m_pwd = '". md5 ($ pwd ). "'and m_name = '". $ _ SESSION ['uid']. "'";
If ($ pwd2! = $ Pwd3 | strlen ($ pwd2) <6 | strlen ($ pwd2)> 12 ){
Alert ('the new password entered twice is incorrect. Please try again! ','');
} Else {
If (mysql_num_rows (mysql_query ($ SQL ))){
$ SQL = "Update gx_member set m_pwd = '". md5 ($ pwd2). "'where m_name ='". $ _ SESSION ['uid']. "'";
Mysql_query ($ SQL) or die (mysql_error ());
Alert ('password modified! ','');
} Else {
Alert ('the old password is incorrect. Please try again! ','');
}
}
?>