Hotel Rooms Under $75

Post image for Hotel Rooms Under $75

By traveldesk   

   ADD TO STUMBLEUPON ADD TO DEL.ICIO.US  Add to Mixx! Mixx  Facebook Tweet This

Times are tough and everyone’s looking to save a little money whenever they can. Here’s our list of over 250 hotel rooms that are under $75 a night.

$db = mysql_connect ("localhost", "wpkath", "kathika01");
mysql_select_db ("wpkath", $db);
$pricecap = 76;

//get the distinct state
$query = "select distinct state from blockbusters where country = 'US' and price < ".$pricecap." order by state";
//execute query
$result = mysql_query($query);

//get the number of results
$num = mysql_num_rows($result);
$numb = intval($num/2);

//set up state abbr conversion
$states = "Alaska,Alabama,Arkansas,Arizona,California,Colorado,Connecticut,Delaware,Florida,Georgia,Hawaii,Iowa,Idaho,Illinois,Indiana,Kansas,Kentucky,Louisiana,Massachusetts,Maryland,Maine,Michigan,Minnesota,Missouri,Mississippi,Montana,North Carolina,North Dakota,Nebraska,New Hampshire,New Jersey,New Mexico,Nevada,New York,Ohio,Oklahoma,Oregon,Pennsylvania,Rhode Island,South Carolina,South Dakota,Tennessee,Texas,Utah,Virginia,Vermont,Washington,Wisconsin,West Virginia,Wyoming,District of Columbia";
//list abbreviations
$abb = "AK,AL,AR,AZ,CA,CO,CT,DE,FL,GA,HI,IA,ID,IL,IN,KS,KY,LA,MA,MD,ME,MI,MN,MO,MS,MT,NC,ND,NE,NH,NJ,NM,NV,NY,OH,OK,OR,PA,RI,SC,SD,TN,TX,UT,VA,VT,WA,WI,WV,WY,DC";
//create arrays
$states_array = explode(",", $states);
$abb_array = explode(",", $abb);
$sl = range(1,$num);
$sn = range(1,$num);

echo '

    ‘;
    for ($i=0;$i< $num;$i++)
    {
    //step thru the results listing by state and building a table with links
    $row = mysql_fetch_array($result);
    $state = stripslashes($row['state']);
    $sl[$i] = $state;
    for($k=0;$k {
    //echo $abb_array[1];
    if($state == $abb_array[$k]){$state = $states_array[$k];}
    }
    $sn[$i] = $state;

    //echo to screen
    echo "

  • “.$state.”
  • “;

    //if is midpoint new table cell
    if ($i==$numb){echo “

    “;}
    }

    echo “

“;
echo ‘

spacer

‘;

$tot = 0;
for ($i=0;$i< $num;$i++)
{

$query = "select city,state,prop_name,prop_code,price from blockbusters where country = 'US' and state = '".$sl[$i]."' ";
//$price modifier
$query = $query . " and price < ".$pricecap;
$query = $query . " order by state,city,price";
//echo ($query);
$result = mysql_query($query);
$numb = mysql_num_rows($result);
$cityname = "";
echo '

‘;
for ($k=0;$k< $numb;$k++)
{
//step thru the results listing by state and building a table with links
$row = mysql_fetch_array($result);
$name = stripslashes($row['prop_name']);
$city = stripslashes($row['city']);
$state = stripslashes($row['state']);
$price = stripslashes($row['price']);
$code = stripslashes($row['prop_code']);
echo "

“;
$tot=$tot+1;
}
echo “

‘.$sn[$i].’  
“;
echo ““;

echo $name . ” ” . $city . “, “.$sn[$i];
echo “

“;
echo “$”.$price .” per night”;
echo “

“;
echo ‘

spacer

‘;
}

echo “
Total number of listings: “.$tot;

?>

Subscribe

FULL RSS or Email  

Tags:
Categories: Travel Deals

Book Travel Hotels, Airlines, Rental Cars & Cruises

Comments on this entry are closed.