Hi All,

Is there some kind of rule which says you canít use request or get within a function? The reason I ask this is because in my function below:

PHP Code:
//=========================================================

// Start function to pull out data for all
function db_result_to_array($result

   
$res_array = array(); 

   for (
$count=0$row mysql_fetch_array($result); $count++) 
     
$res_array[$count] = $row

   return 
$res_array


// PREMIERSHIP TEAMS OUT ONLY for results
function get_premiership_teams() { 
    
$query='SELECT team_id, team_name FROM teams where league ='.$_REQUEST['competition']; 
    
$result=mysql_query($query); 
    if(
FALSE==$result
        return 
FALSE;
    if((
|| FALSE)==mysql_num_rows($result)) { 
        return 
false
    } else { 
        
$xx $_REQUEST['competition']; 
        
$result=db_result_to_array($result); 
        return 
$result
    } 

//========================================================= 
I try to use the statement
PHP Code:
$query='SELECT team_id, team_name FROM teams where league ='.$_REQUEST['competition']; 
ÖBut it does not get the competition. Yet if I call get or request competition outside of the function it returns the value fine?

Thanks

Chris