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
insert/update functions for mysql, what do you think?
I am working on two really simple functions that automatically generate (and execute) insert and upd
How to make a input/output field with multiple lines
Hello.
I put a input/output field on the screen but I could not change height of it. I need to
Credit card verification
I have a client who wants to process credit card transactions from his web site rather than the goin
Why Are These Functions Causing MASSIVE Memory Problems? Please Help!
Hi,
I have a script with some options.
I use regex to replace patterns in strings, but
Curl & sessions PLS HELP
Hello,
I have a problem with curl and sessions and i will try to explain the best i could.
Perplexing problem showing a .jpg
Please disregard..........I figured it out
Code error with Index.php
Error: Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/runevid/public_
Optimize Code
Just started getting into the use of cookies. The following code will redirect users to a set URL s
ORA-00932: inconsistent datatypes: expected - got CLOB
SO : windows xp
database : XE
there is a table (transito) with two fields of clob
Php - mysql select?
hi, i have this code:
Code: <?php
session_start();
// dBase file
include &quo