@ 2014-10-21T23:18:06Z <?php
if ( isset($_POST['submit']) )
{
$array[0] = ',to:Los%20Angeles,%20CA,%20United%20States%20(LAX-Los%20Angeles%20Intl.)';
$array[1] = ",to:Miami,%20FL,%20United%20States%20(MIA-Miami%20Intl.)";
$array[2] = ",to:Nassau,%20Bahamas%20(NAS-Nassau%20Intl.)";
$lower_trim = trim(strtoupper($_POST['dest']));
if ( $lower_trim == "MIAMI" || $lower_trim == "MIAMI,FL" || $lower_trim == "MIAMI,FLORIDA" || $lower_trim == "FL" )
{
$dest = $array[1];
}
if ( $lower_trim == "LOSANGELES" || $lower_trim == "LA" || $lower_trim == "LOSANGELES,CALIFORNIA" || $lower_trim == "ANAHEIM" || $lower_trim == "ANAHEIM,CALIFORNIA" || $lower_trim == "ANAHEIM,CA" || $lower_trim == "LOSANGELES,CA" || $lower_trim == "LA,CA" || $lower_trim == "CA" )
{
$dest = $array[0];
}
if ( $lower_trim == "NASSAU" || $lower_trim == "NEW PROVIDENCE" || $lower_trim == "NASSAU,BAHAMAS" || $lower_trim == "NASSSAU,THEBAHAMAS" || $lower_trim == "THEBAHAMAS" || $lower_trim == "NASSAU,NEWPROVIDENCE" || $lower_trim == "NASSAU,NEWPROVIDENCE,THEBAHAMAS" )
{
$dest = $array[2];
}
$from = "from:FLL"; //leg1
$from2 = $dest; //leg1.2
$datefrom = ",departure:10/23/2014TANYT"; //leg1.3
$to = "from:Miami,%20FL,%20United%20States%20(MIA-Miami%20Intl.)"; //leg2
$to2 = ",to:FLL"; //leg2.1
$dateto = ",departure:11/07/2014TANYT"; //leg 2.3
$children = "children:0";
$adults = ",adults:1";
$seniors = ",seniors:0";
$infant_in = ",infantinlap:Y";
$url_formatted = "http://www.travelocity.com/Flights-Search?trip=roundtrip&leg1=".$from.$from2.$datefrom."&leg2=".$to.$to2.$dateto."&passengers=".$children.$adults.$seniors.$infant_in."&mode=search";
var_dump($url_formatted);
}
else
{
?>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
<h1>ENTER</h1>
<input type="text" name="dest">
<input type="button" name="submit">
</form>
<?php
}
?>
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for 5.2.3 - 5.2.17 , 5.3.0 - 5.3.29 , 5.4.0 - 5.4.45 , 5.5.24 - 5.5.35 , 5.6.7 - 5.6.28 , 7.0.0 - 7.0.20 , 7.1.0 - 7.1.7 , 7.2.29 - 7.2.33 , 7.3.16 - 7.3.33 , 7.4.0 - 7.4.33 , 8.0.0 - 8.0.30 , 8.1.0 - 8.1.28 , 8.2.0 - 8.2.18 , 8.3.0 - 8.3.4 , 8.3.6 <form action="/in/RnTkW" method="POST">
<h1>ENTER</h1>
<input type="text" name="dest">
<input type="button" name="submit">
</form>
Output for 8.3.5 Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
<form action="/in/RnTkW" method="POST">
<h1>ENTER</h1>
<input type="text" name="dest">
<input type="button" name="submit">
</form>
Output for 4.3.0 - 4.3.11 , 4.4.0 - 4.4.9 , 5.0.0 - 5.0.5 , 5.1.0 - 5.1.6 , 5.2.0 - 5.2.2 <form action="" method="POST">
<h1>ENTER</h1>
<input type="text" name="dest">
<input type="button" name="submit">
</form>
preferences:dark mode live preview
193.94 ms | 402 KiB | 308 Q