A fun little trick is the use of fopen().
For instance, the following url:
www.dot.com/login.php?name=bob&pass=63fT
If your script examined the name and pass variables to authenticate the user, and the user simply pasted this url into his browser, as long as the values were correct your script would log your user in.
Your script wouldn't even know the user never clicked the "submit" button.
Now, the fun part.
If you use fopen() to call that url from your own script, the targeted script will think bob hit the submit button and wanted to log in.
Thus you can "automatically" log bob in, using your own PHP script.
Now, the key here is to take the data your user entered into your script, replicate it into a full url (the url of your 2nd script), and we'll call that value $url.
When your user clicks submit, the script targeted will accept the data, activate mail(), create $url, then use fopen("$url", "r") which is exactly the same as had the orginal "submit" script been targeted to your 3rd script.
I have absolutely endless amounts of fun with this little feature 🙂
If I explained it in a confusing way, just say so and I'll try doing it in a different way 🙂