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
Price in PR
Dear Experts,
Why we have to enter the price in the PR, and why there is no free goods indicato
order by date not ID number help php
I am trying to orginize the following code to order by date not id number.
any help would be grea
Question handling xml data
Hello,
I have sucessfull followed this tutorial
http://www.phpfreaks.com/tutorial/handlin
Sessions work for me and not others?
I'm having a bit of bad luck with sessions. In the past they have worked fine for me, but this time
News script
Hi ...
I am not sure if this is the rite place to post this but if its not sorry
i am
mr8m - reverse document
Friends,
I'm trying to reverse a document held by MIRO, but it reports the message balan
Log $_POST
How would i log submits on a form, by everyone? I want to then echo the number of submissions.
writing a screen scraper
Hello,
I'm writing a screen scraper application and want to be able to get absolute addresses
Weird problem with SELECT command..Help!
Hi!
It seems I'm having a really weird problem with SQL SELECT command....I have table into a
Drop Down and text box issue
Is it possible to set a drop down list and text boxes to a certain width?
here is my code