i am having a little difficulty in displaying my id info on my update page. i have two entries 6 and 7 if i click update on id 6 , it will show on my update page, but when i click on submit, it wont update and also if i click update on id 7, on the address bar, it will indicate that the id =7 but it will still show id 6 infos.
here is my display code that display data on my update page
<?ph
include ('config.php');
// Retrieve data from database
$sql="SELECT * FROM $tbl_name ";
$result=mysql_query($sql);
$row=mysql_fetch_array($result);
?>
secondly if i change data on my update page and click on submit the change wont reflect on my view page. and the delete function i dont even know where to start from.
<?php
include('config.php');
//This is the directory where images will be saved
$firstname=$_POST['firstname'];
$lastname=$_POST['lastname'];
$address=$_POST['address'];
$nationality=$_POST['nationality'];
$accountnumber=$_POST['account'];
$accounttype=$_POST['accounttype'];
$balance=$_POST['balance'];
$username=$_POST['username'];
$password=$_POST['password'];
$id=$_POST['id'];
// update data in mysql database
$sql="UPDATE $tbl_name SET firstname='$firstname', lastname='$lastname', address='$address', nationality='$nationality',accountnumber='$account',accounttype='$accounttype',balance='$balance',username='$username',password='$password'
WHERE id='$id'";
$result=mysql_query($sql);
header ("Location: details.php");
?>