Hello everyone, first of all i like to say that the new daniweb webdesign is AMAZING i really like it and hope this site it will become number one for programming and if it does please never BAN its users like stackowerflow do but thats other theme.. :D
I have a problem with the change password box this code should work but it doesn't any solutions ?
<!-- CHANGE PASSWORD BOX -->
<form method="POST" action="navigation.php">
<div class="modal fade" id="changePassword">
<div class="modal-dialog modal-md">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Change Account Password</h4>
</div>
<div class="modal-body">
<p><input type="text" class="form-control" name="oldPass" placeholder="Enter Old Password"/></p>
<p><input type="text" class="form-control" name="newPass" placeholder="Enter New Password"/></p>
</div>
<div class="modal-footer">
<input type="submit" class="btn btn-success btn-block" data-dismiss="modal" name="changePass">Change Password</input>
</div>
</div>
</div>
</div>
<?php
if(isset($_POST['changePass'])) {
$newPass = $_POST['newPass'];
$oldPass = $_POST['oldPass'];
$password = getUserData('users', 'Password');
if($oldPass != $password) {
?>
<p>Incorrect 'Old Password'</p>
<?php
} else if($newPass == $password) {
?>
<p>You must use different password!</p>
<?php
} else {
$user = getUserData('users', 'UserUsername');
$email = getUserData('users', 'Email');
$sql = "UPDATE `users` SET `Password`='".$newPass."' WHERE `Email`='".$email."' AND `UserUsername`='".$user."'";
$return = $conn->query($sql);
?>
<p>Password changed successfully.</p>
<?php
}
}
?>
</form>