View Single Post
Unread 21 Dec 2005, 17:29   #17
meglamaniac
Born Sinful
 
meglamaniac's Avatar
 
Join Date: Nov 2000
Location: Loughborough, UK
Posts: 4,059
meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.
Re: Basic PHP Help: Global Variables?

Anyway, if you slapped all that (and took out the echos) into a seperate PHP file as a function (let's say getUid), and added "return $unique;" at the end, you could use something like this:

PHP Code:
<?php
require_once("uidGenerator.php");
$uid getUid();

include 
"pageHeader.php";

//stuff

include "pageFooter.php";

?>
Please note, you do NOT need to pass the variable $uid to the header/footer includes as PHP variables are global by default, so will be available to any code (included or not) from the point of their declaration.
__________________
Worth dying for. Worth killing for. Worth going to hell for. Amen.

Last edited by meglamaniac; 21 Dec 2005 at 17:37.
meglamaniac is offline   Reply With Quote