Ver Mensaje Individual
  #2 (permalink)  
Antiguo 18/05/2013, 16:15
Avatar de bulter
bulter
 
Fecha de Ingreso: enero-2008
Mensajes: 137
Antigüedad: 16 años, 4 meses
Puntos: 20
Respuesta: Post dinamico a diferentes paginas según la selección de un menu o lista d

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 ?