Thanks for the tip Kirk, I'll try declaring the global in both functions that use it, hopefully that'll do the trick.
My application is actually the Guestbook applicaiton from the Greenspan/Bulger book. (I'm a newbie if you haven't guessed already).
The situation is that file 1 (sign.php if you're following along in the book) is called multiple times with different output. The output depends on the state and contents of a form that file1 prints out.
If the $submit variable contains 'sign' from the form, it uses a whole slew of form variable to create an entry.
The entry creation routine is defined in file 2, which is included at the top of file one.
To make matters more complicated, the variable I'm trying to pass to the create function (file 2), must be called from the top of file 1, but is actually given value towards the bottom of file 1.
Hope that makes it make more sense...
D.