OK, ryan, im gonna explain this as simply as I can:
There two primary ways (more if you count cookies, etc... but I'm not going there) to pass data: the GET method and the POST method. GET method uses the string on the url, everything after the ? you see. POST uses the headers (I think, not too sure, don't quote me on that). POST data you can't visually see, GET data you can.
This data is pased in name=value form. So, ?var1=test&var2=this means
var1 equals "test"
var2 equals "this"
So, with that said, here's a hypotheitcal for you:
The goal is to build a website. It is a simple website, consisting of two pages, ball.php and glove.php. What it does is a user enters a type of ball in ball.php and "throws" (sumbits) the ball to glove.php. Glove.php will tell the user what type of ball was thrown. Here's the code:
ball.php code:
<form method="get" action="glove.php">
What type of ball to throw:
<input type="text" name="ball">
<br>
<input type="submit" value="Throw">
</form>
glove.php code:
<?
if(!$ball) { // if no value was entered in the ball field
echo "You didn't throw a ball!";
} else {
echo "You threw a $ball ball.";
}
echo "<br>";
echo "You used the $REQUEST_METHOD to throw the $ball ball.";
To rpactice with this, change method="GET" in ball.php to method="POST" and you'll see the difference.
Let me know if that helps....