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
exclude characters from counting?
Hello, I wanted to ask if you have a string like:
Code: $my_s='ASRGREGTGTR----REGREGRE+++RRRRRR..
Windows 7
Windows 7 default user account control worries experts. Corporate IT departments should be pleased w
Request-URI Too Large
I have created a simple submit form for a mysql database that puts a piece of code into database.<
Relative path
I have a absolute path to an image - like so: C:/Program Files/Apache Software Foundation/Apache2.2/
turning an array into a string then poping it into a db
Hi im just wondering how you get a requested array into a single string then pop it into the db so f
Problem with array max size.
Hi to everyone,
I've got a homework about filling a bidimensional array un spiral shape, I alre
php title problem
Hi,
I am having a problem managing my page title with PHP.
Currently I have my <
Display data returned from Ajaxservices!!
I have a question about displaying results using ajax. I have part of the code below.
$.ajax({
PHP webpage & array print issue
I have this code running, and it works perfectly … however, see my bottom bit about what I see
Impact of movement type 412 E on MAP
Hi
Usage of movement type 412 E is causing huge change in MAP .
Is there any r