Jump to content

thodanga

New Members
  • Posts

    2
  • Joined

  • Last visited

thodanga's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Try these code changes... <?php include_once("Mydbtable.php"); if(isset($_POST['submit'])) { $Old_pwd=$_POST['Oldpass']; $New_pwd=$_POST['pass1']; $confirm_pwd=$_POST['pass2']; #$data_pwd=$fetch['Oldpass']; #you don't need this $email=$fetch['email']; if($New_pwd != $confirm_pwd) { $msg= "Passwords do not match. Please GO BACK and try again."; } else { #Binary keyword make sure that the password is case-sensitive $sql = "SELECT * FROM MembersTable WHERE email = '$email' AND BINARY password = BINARY '$Old_pwd' "; $result = mysqli_query($Mydbtable, $sql); if(mysqli_num_rows($result) == 0) { $msg= "Passwords do not match. Please GO BACK and try again."; } else { $sql = "UPDATE MembersTable SET password = '$New_pwd' WHERE email = '$email' "; $result = mysqli_query($Mydbtable, $sql); $msg="Password successfully changed"; } } } ?> <form method="post" name="change"> <?php echo $msg; ?> <p>old password<br /> <input type="password" name="Oldpass" id="Oldpass" /></p> <p>New password<br /> <input type="password" name="pass1" id="pass1" /> </p> <p>Confirm password<br /> <input type="password" name="pass2" id="pass2" /> </p> <p> <input name="submit" type="submit" value="Save Password" /> </p> </form>
  2. Try this logic tweak... function track_app($app_id, $lang_code, $str, $instance) { $lang_id = get_lang_id($lang_code); $query = "INSERT INTO `tracking` ( `APPLICATION_ID`, `LANG_ID`, `INFO` ) VALUES ( $app_id, $lang_id, '$str' )"; if ($instance > 0) { if ($str == 'LOAD_APP' || $str == 'APP_LOADED') { $query = "INSERT INTO `tracking` ( `APPLICATION_ID`, `LANG_ID`, `INFO`, INSTANCE_ID ) VALUES ( $app_id, $lang_id, '$str', $instance )"; } mysql_query("INSERT INTO `tracking_backup` ( `APPLICATION_ID`, `LANG_ID`, `INFO`, INSTANCE_ID ) VALUES ( $app_id, $lang_id, '$str', $instance )"); mysql_query("UPDATE `instances` SET ACTIVE = 1 WHERE INSTANCE_ID = $instance"); } mysql_query($query); }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.