$siti = array(
'scelta1' => array('tutti','i siti','chevuoi'),
'scelta 2' => array('tutti','i siti','chevuoi'),
'scelta 3' => array('tutti','i siti','chevuoi')
)
function switchpage($siti=false){
if($siti){
$provenienza = $_SERVER["HTTP_REFERER"] ;
foreach($siti as $k=>$v){
if( in_array($provenienza, $v){
return $k;
}
}
}
return false;
}
no testato no filtrato, its only a proof of concept
M.