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
Windows 7
Windows 7 default user account control worries experts. Corporate IT departments should be pleased w
use an array from 1 class in a second class
I have a class that adds data to an array
Then I have a second class and I need to check if t
date function help
i need help with date function
Code: [Select]<!DOCTYPE HTML PUBLIC "-//W3C//DTD H
retrieving policy name inside the function called by this particular policy
Hi there,
I've playing around with dbms_rls package, trying to set up some security repo
login form can you find my error?
registrationform.php seems fine send data to registration.php
registration.php seems fine checks
Cant display mysql data
Hey all,
I am learning php and my first goal is to create a simple CMS. At the moment I am st
php wont update my db
hello,
sorry for posting in mysql forum but i dont know where exactly is the problem but here
getting weird error..
okay, I'm getting an error on this particular function, something about the syntax in the mysql LIMI
Change Web page language
i doing this thing first time but i dont find any suitable solution for it. On the demand of user. I
How to change www in url with a specified name
Hi
I'm trying to change the url http://www.sitename.com/apparels to something like below
http: