You are not posting the values from view.php, you are just sending through query string.
so in edit.php you need to take the data something like $_REQUEST['id']
You are not submitting the data in a form (So why are you checking in if condition as $_POST)
I suggest you to send one more parameter kin view.php, such as
and in edit.php
check for $_REQUEST['action'] == 'edit'