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
simplexml_load_file and rss problem
Hi,
I have a problem parsing an rss feed using simplexml_load_file - this is strange as i hav
On page view, minus credit
Hello all, please, I need a little help with this script. I am charging one credit (credits can be p
Convert Binary String to Decimal
Trying to Get:
Decimal: 305419896
Out of:
Binary String: xV4
Remove values in array2 from array1
I have two arrays.
Array 1 is where the array key holds various different numbers. For exampl
Inserting a variable in a link
I have this code that I want to insert for my own variable but I have no idea how. This is what I wa
echo $rows help
Hi all,
Hopefully something simple that I don't know!
I have this:
Code: [Selec
How to generate a text file using php...?
Hi,
Can anyone give me code to generate a text file using php
Thanks in advance
Delete Client 066 Earlywatch
Hi all,
in former times client earlywatch was required for SAPs remote access to SAP inst
If a record matches an existing record do nothing
So I don't know if I should put this here or in mysql, but what my script is for is for people to ad
error checking breaking my code
Hi there, OK first of all, big apologies for what I assume is really fundamental errors in the struc