Hi,

I declared my variable as global and used it to hold a query result but the variable is not passing its value to another php page where I need it again for another query something like this:

1st php page:
global $comp

$result = "Select Company from dbtable where Name = ABC";
$comp = $mysql_query($result);


2nd php page:

$query = "Select Branch from dbtable2 where Company = '$comp'";

pls help