Hi all,
I currently have the following:
<?
foreach ($_SESSION['cart'] as $_GET['isbn'] => $qty)
{
// Loop starts here.
$_SESSION['total_price']=calculate_price($_SESSION['cart']);
$_SESSION['items']=calculate_items($_SESSION['cart']);
$sql= "SELECT * FROM movie, movie_status WHERE movie.movie_id = movie_status.movie_id AND movie.movie_id='" . $_GET['isbn'] . "'";
$sql_result = mysql_query($sql,$connection) or die ("Could not select data");
while ($row = mysql_fetch_row($sql_result))
{
$movie_title= $row[1];
$movie_current_price= $row[4];
}
?>
<table width="405" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class=text2 width="280" valign="top"><B><? echo $movie_title ?></B>
<BR>
Format: DVD <BR>
Should arrive between Tuesday , 05/13/2003 and Tuesday
, 05/20/2003</td>
<td width="10"> </td>
<td class=text2 width="45" valign="top"><? echo $qty ?></td>
<td class=text2 width="70" valign="top"><? echo $movie_current_price ?></td>
</tr>
</table>
<?
}
?>
At the moment, i am able to successfully get the $movie_title and $qty values but am unable to get the correct values for $movie_current_price. It is getting row[4] from the movie table but i need it to get the row[4] values from the movie_status table.
Can anyone tell me how to go about this?
Cheers,
chrima