vj_maple Posted February 9, 2011 Share Posted February 9, 2011 Hi, i am currently working on a bidding site.The problem i have it here is in login section.Actually my login script works well in my localhost but in live server its not working.Can anyone give me the solution for this.Here's the script if( isset( $_POST['usernam'] ) && isset( $_POST['password'] ) ){ // Added by Mhike if(strlen($_POST['usernam']) > 0 && strlen($_POST['password']) > 0 ){ //validate fields $usr = trim($_POST['usernam']); $pwd = trim($_POST['password']); $pwd = DeCrypt($pwd,$rc4Key); //login check $q = " SELECT idCust, username, status FROM customer WHERE username = '$usr' AND password = '$pwd' "; $rs = $dba->Execute($q); if($rs){ $res = $rs->FetchObject(false); } if($res->username == false){ $err = 'User name or password is invalid!'; } else if(strtolower($res->status) == 'i'){ $err = 'Your account is not yet activated, please check your email and activate your account!'; } else { //log to main page $_SESSION['user'] = $res->username; setcookie("user_cookie",$_SESSION['user'],time()+60*60*24*30); $_SESSION['user_id'] = $res->idCust; header('Location: index.php'); } } Quote Link to comment Share on other sites More sharing options...
gizmola Posted February 11, 2011 Share Posted February 11, 2011 You need to provide more information other than "it doesn't work." Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.