I am still having problems with variables not being remembered by included files. I've tried using the global command and it still doesn't work. I've cut down my two pages to contain the main stuff so you can see what's happening. Basically main.php includes the file new.php and I want the variable '$name' to be remembered in it. The other included files aren't important to the problem I'm having.
main.php =========== <?php global $name; $name = 'home'; ?> <html><head> <title>Tite</title> <link rel="stylesheet" type="text/css" href="stylesheet.css"/> </head> <body> <?php include("http://www.vocalwebsites.com/neilhowlett/new.php") ?> <hr> <?php include("http://www.vocalwebsites.com/footer.php"); ?> </body> </html> new.php ============= <table><tr><td> <?php include("http://www.vocalwebsites.com/date.php"); ?> </td></tr></table> <table><tr><td><a href="page.php"><img src="image.gif"></a></td></tr></table> <table><tr><td> <?php global $name; echo $name; ?> | home | <a href="biog.php">biography</a> | <a href="perfcareer.php">performance</a> | <a href="credo.php">teaching</a> | <a href="articles.php">articles</a> | <a href="audio.php">audio</a> | <a href="contact.php">contact</a> | </td> </tr> </table> ============= At the moment $name is not printing out in the included file which seems to me like php has forgotten the variable. Any ideas? If I actually get this to work I want to be able to use the variable '$name' to be able to change the 'navigation bar' in new.php so that the correspoding link won't be linked. For example in the above example if $name = home then 'home; won't have the <a> link tag or if $name = contact then contact won't be linked. I know I am not explaining this very well, but I hope this is clear. Ian Gray ===== --------------------------------- Ian A. Gray Manchester, UK Telephone: +44 (0) 161 224 1635 - Fax: +44 (0) 870 135 0061 - Mobile: +44 (0) 7900 996 328 US Fax no.: 707-885-3582 E-mail: [EMAIL PROTECTED] - Websites: www.baritone.uk.com (performance) & www.vocalstudio.co.uk (Tuition) --------------------------------- __________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php