Prova a fare così:
Codice PHP:
<?php
if ( (!isset($_GET['pageid'])) or (!isset($_GET['ristoranteid'])) ) 
header ("location: index.php?pageid=homepage");
else
$ristoranteid $_GET['ristoranteid'];
?>
...
...
Fammi sapere