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......
Did you know?Explore Trending and Topic pages for more stories like this.
<?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
MASS PM
Hello all, I'm trying to send mass private messages to users in my database but keep getting an erro
Loop Through Date Range
Hi guys,
I have date range as parameter like 01/JAN/2009 TO 16/JAN/2009 now i want to loop thro
Downloading file (Headers)
I'm trying to make users download a file, but they must wait 60 seconds before it begins.
But
Small problem with image resize script
Hi!
I am a little bit new to php and I have an issue installing an image resize script I down
Strip Slashes Help
I've got a script that i've downloaded of the net to edit multiple fields from my sql database, and
whats wrong with my code please help!!!
this is the error
Warning: mysql_close(): supplied argument is not a valid MySQL-Link res
Mass activity scheduling
Hi experts,
Im facing some problems to deal with mass activity jobs.
When I run some
Change snippet to use CURDATE
I am using time() in the snippet below, I would like to use CURDATE() and have the database setup fo
apart from cron
I need to run a php file every one hour. Is there any other solution apart from cron job?
Multiple while loops
I have several DB queries that I know should be returning results and aren't. I have a feeling it ha