Connecting to a mySQL database through PHP first requires knowing what a few parameters are. I suggest making these parameters variables that you can easily change, so that if these parameters change you don't have to go in and alter hundreds (or worse thousands) of mySQL connections inside your scripts. Keep these variables in a setup file and require it or at the very top of scripts you write so you can change them.
PHP4 is packed with good features. One of the most popular is session variables. These are variables that persist throughout a session, as the user moves from page to page. Session variables are great holders of state information and other useful stuff.
To use session variables, call session_start() at the beginning of your web page, before your HTTP headers are sent. Then for every variable you want to keep alive for the duration of the session, store it in $_SESSION[$variable_name]. By default, the session handler will keep track of the session by using a cookie. You can save objects or arrays in session variables also (but be warned that this is buggy in some versions of PHP4).
This tutorial assumes that you already are familiar with writing PHP code, and that you have a working MySQL installation, and that you are familiar with basic SQL syntax. If not please use these tutorials first:
Basic PHP and Apache Installation Guide on Windows
MySQL Installation Guide on Windows
Simple PHP Tutorial.
Joining mailing list will entitle you
to receive occasional emails informing you of news and
updates to the site and any special offers that may be
of interest to you.