โดย vena_amori » 20/06/2011 11:31 pm
$a =1;
$total = 0;
$total = (int)$total;
$b=1;
for($k=1;$k<=$_SESSION[num_night];$k++){
$_SESSION[chkdate.$a];
$_SESSION[chkmonth.$a];
$season_id = $_SESSION[season_priceid.$b];
$sql_price = "select * from price where hotel_id = '$rows_room[hotel_id]' and roomtype_id = '$rows_room[roomtype_id]' and season_id = ".$season_id." ";
$result_price = mysql_db_query($Mysql_db,$sql_price);
$rows_price = mysql_fetch_array($result_price);
$_SESSION[ss_price] = $rows_price[price];
$price_night.$a = $rows_price[price]*$_SESSION[num_night];
$price_nights.$a = (int)$price_night.$a;
$total = $total + $price_nights.$a;
$total น่ะค่ะ มันไม่บวกกัน T_T
$a =1;
$total = 0;
$total = (int)$total;
$b=1;
for($k=1;$k<=$_SESSION[num_night];$k++){
$_SESSION[chkdate.$a];
$_SESSION[chkmonth.$a];
$season_id = $_SESSION[season_priceid.$b];
$sql_price = "select * from price where hotel_id = '$rows_room[hotel_id]' and roomtype_id = '$rows_room[roomtype_id]' and season_id = ".$season_id." ";
$result_price = mysql_db_query($Mysql_db,$sql_price);
$rows_price = mysql_fetch_array($result_price);
$_SESSION[ss_price] = $rows_price[price];
$price_night.$a = $rows_price[price]*$_SESSION[num_night];
$price_nights.$a = (int)$price_night.$a;
$total = $total + $price_nights.$a;
$total น่ะค่ะ มันไม่บวกกัน T_T