Hi all,
I have the following:
foreach ($_SESSION['cart'] as $isbn => $qty)
{
$sql = "select * from movie where movie_id='$isbn' AND movie_ship_charge='yes'";
$sql_result = mysql_query($sql,$connection) or die ("Could not select data");
while ($row = mysql_fetch_array($sql_result)){
$movie_current_price = $row['movie_current_price'];
if ($_POST['reg_post'] == 'Y'){
if ($movie_current_price <= 100){
$_SESSION['reg_post'] = "1.90";
} else if ($movie_current_price >= 101 && $movie_current_price <= 200){
$_SESSION['reg_post'] = "2.95";
} else if ($movie_current_price >= 201 && $movie_current_price <= 300){
$_SESSION['reg_post'] = "4.00";
} else if ($movie_current_price >= 301){
$_SESSION['reg_post'] = "0.00";
}
}
}
}
$_SESSION['ordShipping'] = number_format($_SESSION['reg_post'], 2, ".", ",");
Lets say that i have three $movie_current_price results returned, how do i get the
number_format($_SESSION['reg_post'], 2, ".", ",");
to update according the the reslts returned?
Cheers,
micmac