Hi all,
I want to approve records in my page. For that i have created a search where data retrieves based on account_number. Now i want to approve records. For that i have created a page called approve_page.php. But it seems to be applied for all the data. I just want to approve ONLY one record at a given time.(one by one)
<?php
$connect=mysql_connect('localhost','root','');
mysql_select_db('bank',$connect);
$account_number=$_POST['account_number'];
$query = "select * from transaction WHERE account_number='$account_number'";
mysql_query($query) or die(mysql_error());
$query = "UPDATE transaction SET approved_status='1'
WHERE account_number='$account_number'";
$result = mysql_query($query) or die(mysql_error());
if ($result)
{
echo "Details have been successfully approved";
}
?>