Of course...instead of making the link to another page, but make the form <form action="<?php echo $_SERVER['PHP_SELF'];?>"> rather than 'update.php'
You basically now have three things you want to do on this page:
1) display a drop down of the items in the db, clicking them will display the 'edit' function
2) display a dropdown of the items in the db, below which you have another form which contains the relevant fields for editing
3) when the user clicks 'update' it performs the sql query to update the db
let's call the file 'manage.php'
let's name your 3 actions: 'view', 'edit' and 'update'
Your first state is inherent - if i go to yoursite.com/manage.php, it's automatically 'viewing' - no action has been specified, so all i get is the drop down.
The dropdown links, however, refer to an action:
<form action="<?php echo $_SERVER['PHP_SELF'];?>?action=edit">
or
<form action="<?php echo $_SERVER['PHP_SELF'];?>?action=update">
All you need to do now is tell it what to do when it gets those actions:
if (!isset($_POST['action']) //if the action is not received
{
echo 'Here is the dropdown of articles'; //you're in 'view mode' as it were, so just display the dropdown
}
else
{
$action=$_POST['action'];
}
if ($action == 'edit') //if you're telling it to edit
{
//connect to server
//retrieve fields for that id
echo 'html for the drop down here'; //show the drop down
]<form action="<?php echo $_SERVER['PHP_SELF'];?>?action=update">//start a form
echo 'show the fields populated with values from the db for that record id';
echo 'have a button here to submit the form';
} //you've now finished telling it what to do if you want to edit
if ($action == 'update') //now you've edited the information and are ready to update it
{
//connect to server
//get variables from the form
mysql_query("UPDATE mytable SET title='$title', article='$article' WHERE id=$id") //perform the SQL query to update them
echo 'something nice to say to confirm that the update has been successful (or not)';
}
Hope this helps!