please help me... my password gets encrypted but not able to get in database
Posted on
16th Feb 2014 07:03 pm by
admin
hai guys,
please help me... in the following function my password gets encrypted but not able to get in database.is any error in the query please help me......
<?php
$email = $_POST['username'];
$oldpass=$_POST['password'];
$newpass=$_POST['newpass'];
$conpass=$_POST['confirmpass'];
$encry_oldpass=md5($oldpass); //encrypting old password
$con = mysql_connect("localhost","root","");
mysql_select_db("content_management",$con);
$result=mysql_query("SELECT * FROM register_data WHERE eMail='".$email."' and password='".$encry_oldpass."' and isValidate=0 and isDelete=0");
$count=mysql_num_rows($result);
if((!empty($newpass)&&!empty($conpass))&&($newpass==$conpass)&&($count=='0'))
{
$encry_conpass=md5($conpass);//encrypting confirm password
$result2=mysql_query("UPDATE register_data SET password='$encry_conpass' WHERE eMail='".$email."' and password='".$encry_oldpass."' and isValidate=0 and isDelete=0");
echo "Password Chamged Successfully";
header("location:..............."); // redirect to login page
}
else
{
echo"Password Change Fails";
// header("location:..............."); // redirect to password change page
}
?>
No comments posted yet
Your Answer:
Login to answer
111
36
Other forums
Vertical Alligning - Not working in 1 cell?
<?php
echo "<table id="valign" width="60%" style=
server trace logs
could any one tell me from where do i get error logs in xMII??I want to check the reason for dtabase
Final year project, please point me in the right direction
hi there for my final year project I'm aiming to build a php script shell to use as an expert system
Unidentified index error in a simple form
I have been trying to make an HTML form that is handled by a PHP script. So far my attempts to get i
MySQL noob question
hi guys
I have a simple mysql table set up, along the lines of
Col 1 - Col 2 - Date_l
Rounding a number queried from a database
I know that to display a rounded number you just do echo "round($number)";. But how would
try catch error
I have been trying try catch but, I can't get it to work. The code opens a non existing file called
Filtering an Array Based on Value
I have a very simple script set up that pulls data from a database and is output using this code:
Displaying image pathname instead of image
Hello
Im trying to upload and then display images from a mysql database - Its only basic and
asking for direction
I have 2 tables in my data, which are "post" and "event"
I won't make a summa