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
}
?>
get multiple rows
Hi I want to get multiple rows from a dbI am using this for the db queryCode: public function getCeleb($product_id) { $query = $this->db->query("SELECT * FROM " .
cURL Sending File as Post
This is a bit complicated, I'm just hoping someone else has run into this and knows how to do it a different way or make it work.When sending a file as part of form information included in a cURL
Ariba 9r - SAP MM Integration
Hi experts,
Unidentified index error in a simple form
I have been trying to make an HTML form that is handled by a PHP script. So far my attempts to get it to work have proven fruitless.I'm referencing the Visual Quickstart Guide for PHP to learn PHP,
button help
i originally had this but realised it is much easier to have a button.Code: <?php$search = $_GET['search'];$checkbox = $_GET['checkbox'];if($checkbox ==
Save username into DB
OkaY so I got my blog to actually save the posts and whatever, all I need now is for it to keep the right posted. That database is set up to keep post id, title, subject, date, and author. The only
JSON SORT WITH PHP
I have two products that I want to sort by say "Id:17, value: xxx" using phpThe page will end up looking like thisPart Number Diameter Effective focal back focal cntr thickness
array_map() probably obvious mistake
The code below is part of a class to escape strings, but should also accept an array, using array_map() to do the job. Unfortunately, passing an array results in the original, unescaped array being
pointer 102 question
I read a book
Rand() help needed
Hi all,Can someone explain and give me a quick example of how I would go about this?I have 100 values in a database with colum headings of t_val and t_name. If I wanted to update all 100 of these