why not do the following:
on the form to be posted:
<input type="submit" name="submit" value="myvalue">
and on the page it post's to....
$value = $_POST['myvalue']; or $value = $_GET['myvalue']; (cant remember which one you need)
and then the code I mentioned....
anyway something like this... I really am an amateur at coding but I did play around quite a bit a few years back!