PHP handles both GET and POST methods for handling information from page to page. Let me provide an example for you:
I create a form in a page called FOO, like this:
<form method='get' action='BAR.php'>
<input type='hidden' name='passed_variable' value='something'>
<input type='submit' value='Press here to continue'>
</form>
Upon pressing the submit button, all information in the form is passed to page BAR. Now let's see what BAR does:
<?php
$passed_variable=$_GET['passed_variable'];
echo "Passed variable is $passed_variable <br/>";
?>
This first section pulls the variable off of the URL line (You'll see it passed on the url at the end as "?passed_variable=something"). It then echos it, to show you that it was properly passed.
Now, let's go on to the form on BAR. You might actually create it like this:
<?php echo "
<form method='post' action='BAS.php'>
<input type='hidden' name='passed_variable' value='$passed_variable'>
<input type='submit' value='Press Me'>
</form>
"; ?>
Note that we used php's ECHO command to create the input line with the variable's value substituted for the text.
Upon pressing this button, the information is sent via POST to page BAS. If you look at the url, there is no information attached to the end. POST uses an internal server mechanism to send variables. How do we get it? Let's see:
<?php
$passed_variable=$_POST['passed_variable'];
echo "Passed variable is $passed_variable <br/>";
?>
Which is better GET or POST? It depends on your situation. POST is slower, but is more secure and allows you a much larger environment space to pass variables in. GET is faster, but all variables are on the url line and are prone to tampering. Also, it is easy to overrun the URL buffer by relying on GET too much. You'll then likely get some sort of mysterious browser message, that looks like someone's hacking your system. :-)
Still GET is very useful. You can add variables from page to page by simply adding ?var1=value1&var2=value2&var3=value3, etc. to your URL. Note the first variable you pass uses a question mark, the rest use ampersands.
One more thing I've run across. Passing a variable with spaces, via GET, gets tricky when you pass it on a second time. The spaces tend not to get converted properly. I wrote a small routine that simply EXPLODEed the passed parameter, with a space as the delimiter, and reconstructed the parameter substituting + signs in place of spaces. Hopefully, you won't have to go that far.
Hope this helps.
John K