I have created these 2 pages to allow users to modify details by searching them based on the account numbers.
When i entered a particular account number and search all the records currently available in the database were diaplayed irrespective of the account number. Can anyone solve this issue?
check_data.php
[php]
Enter Account Number:
[/php]
modify_data.php
[php]
Customer details
<?php
$connect=mysql_connect('localhost','root','');
mysql_select_db('bank',$connect);
//$account_number = '';
$full_name = '';
$name_with_initials = '';
$phone_number = '';
$address = '';
$gender = '';
$date_of_birth = '';
$account_type = '';
$fd_period = '';
$query ="SELECT account_details.full_name,phone_number,address,gender,date_of_birth,account. name_with_initials,account_type,fd_period FROM account_details,account WHERE account_details.account_number=account.account_number";
$result=mysql_query($query) or die( mysql_error() );
if( mysql_num_rows($result)==0 )
{
echo " No records found.
";
}
while($row=mysql_fetch_assoc($result)){
$full_name = $row['full_name'];
$name_with_initials = $row['name_with_initials'];
$phone_number = $row['name_with_initials'];
$address = $row['address'];
$gender = $row['gender'];
$date_of_birth = $row['date_of_birth'];
$account_type = $row['account_type'];
$fd_period = $row['fd_period'];
?>
// retrived values in text boxes
[/php]