I have a php page that reads the $_get variable and connects to database to run query and return data. If I want to move my php code to the top of the calling page instead whats the best way to pass the variable to the code? In other words instead of calling getdata.php from index.php I just want to have the php code before html and have it run from a link or button.