You can do this like bellow:
- First You should pass the values which you want to update by the url. link test.php
in test.php
<a href="test1.php?id=1&new_name=newtest1">Test1</a>
- Now in test1.php, you should first perform the update operation and then do the rest of the things.
test1.php
$id = $_GET['id'];
$new_name = $_GET['new_name'];
update();//here goes the update operation
//...........do the rest here
Hope this will help you.