There's 3 main ways to send/recieve data from one script to the next. GET, POST and Sessions.
GET can be used in 2 ways. Through a form with the method="GET" or directly into the query string like you were doing above. All of the data is held in the array $_GET
POST can only be used through a form. The data is invisible to the user. You use the $_POST array for that data.
And of course the almighty sessions. Sessions provide a way to keep a user logged in. When a session is started it checks if there is a session in progress, if so php will retrieve the ID from a file it's held in. If not it creates a new one. Sessions are passed with the $_SESSION array. The forums for example use sessions to keep you logged in. If you look at the query string once your logged in, you'll see s=, this tells php a session is in progress and it should retrieve the ID. You can also pass this through a cookie. That keeps a user logged in even if he closes the browser. Without the cookie, the session will be deleted if the user closes the browser.
if you want more help, there's always the official php manual,
http://www.php.net/manual/en and another great site
http://www.devshed.com has excellent tutorials on php