Hi Warren heres a tip for you to save a later headache.
There will be some things such as db connection and functions that need to be called on every page so rather than writing it into every page why not get the php to drag it in for you and then should something change you only need to change one file.
There are 2 ways to do this but personally I use the 'include' function and it works thus.
Set up a file called incConfig.php. then in that file you can put all youu configurations:
Like merlin has put above.
// set here mysql options
$mysqlip='localhost';
$mysqluser='username';
$mysqlpass='password;
$mysqldbname='databsename';
// do not change anything below here
$db = mysql_connect($mysqlip, $mysqluser,$mysqlpass);
if (!$db)
echo "Error: Could Not Connect to mySQL database. Please check Address/User/Pass information in Config File.
";
else
if (!mysql_select_db($mysqldbname,$db))
echo "Error: Could not Select mySQL database. Please Check database Name in Config File.
";
This will then do all your connection business
Then where ever you need to call this file just put:
<? include("incConfig.php"); ?> at the top and it will include that file.
Then when ever you need to use the database you are already connected and all you need to do is as follows for example:
$result=mysql_query("SELECT * FROM yourtable WHERE memberid='2' LIMIT 1",$db);
$myrow=mysql_fetch_array($result);
NB note the $db from the include file.
This is also great for navigation systems that appear on every page and also remember you can include files within include files etc.
I hope this is if help to you
Gary