Código PHP:
<?php
///
/// Define pages and there names as array indexes
///
$pageList = array("cancun" => "cancun.php",
"rmaya" => "rmaya.php",
"ptovallarta" => "ptovallarta.php");
$selectedPage = isset($_POST['test']) ? $_POST['test'] : null;
if($selectedPage != null && isset($pageList[$selectedPage]))
{
if(file_exists($pageList[$selectedPage]))
{
include($pageList[$selectedPage]);
}
else
{
echo "File was not found.";
}
}
?>
Te refieres a esto ?