thanks for your help kirby.
I'm still getting a blank page.
This is so strange. I even tried it adding the following to the top to see if that made a difference:
chdir('/home/mywebname/public_html/forums/');
define('NO_REGISTER_GLOBALS', 1);
require_once('./global.php');
I think that I must be missing something obvious.
Should the code should go into a regular .php file?
Is there anything else I need to add to it?
Even if I try and take out the random function I'm still getting blank pages. This has been 4 days I've been working on it and still no joy