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
Calender Not Opening
The following code is not loading the javascript calender in another window. It's not doing anything
understanding functions and classes
Code: [Select]
class person {
var $name = "Jimmy Goe";
function get_nam
Socket Server
In my following socket server, I am trying to listen to a connection through port 12345 in my web br
Writing Windows Device Drivers with C
Yes: one of the nice features of C is void*. You can put anything there and get anything out. Very
unexpected T_STRING
error log "[Sat Jan 09 18:27:58 2010] [error] [client 127.0.0.1] PHP Parse error: syntax error
Filtering Tables
Hello Thanks for any help any one can give Im very new to PHP..
I need to pull data for clien
php call servlet
I have done a php backup application .
So there is a form that user pick some files to zip and d
How to display random record from table?
I have the following code:
Code: <?php
$display_block .= "<input type=
Sending UDP Raw socket
I truly need help on this. I am trying to write a test program that simulate a network environment
Am I setting up my sites oldschool?
Ok,
When I create a site I open a basic template that I have created that consists of a css f