hi
Thankyou so much for your response....as you suggested Im now using session arrays, please read my code, I have new errors...
<?php
session_start();
$sess_Itempointer = 0;
$sess_Itempointer = $SESSION["sess_Itempointer"]+1;
$SESSION["sess_Itempointer"]=$sess_Itempointer;
//shopping baskets for arrays of name, qty,
//price and cost. A variable for total cost.
$ses_basket_tcost;
$ses_basket_name[10];
$ses_basket_quantity[10];
$ses_basket_price[10];
$ses_basket_cost[10];
//getting the items from the web page.
$ses_basket_name[$sess_Itempointer]=$POST["id"];
$ses_basket_quantity[$sess_Itempointer]=$POST["quantity"];
$ses_basket_price[$sess_Itempointer]=$POST["price"];
$ses_basket_cost[$sess_Itempointer]= $POST["quantity"] * $_POST["price"];
$ses_basket_tcost+= $ses_basket_cost[$sess_Itempointer];
// register the new basket in the session
session_register("ses_basket_name");
session_register("ses_basket_quantity");
session_register("ses_basket_price");
session_register("ses_basket_cost");
session_register("ses_basket_tcost");
?>
<html>
<head>
<title>Order Page</title>
<link rel="stylesheet" type="text/css" href="../../../mystyle.css"/>
</head>
<body>
<h1>Order Page</h1>
<p>
<div align="center">
<table bordercolor="#C0C0C0" style="border-collapse: collapse; color:#CCCCFF ;font-
family:'Palatino Linotype'" cellpadding="8" cellspacing="1" border="5" width="0" >
<tr>
<th>
Product Name
</th>
<th>
Quantity Ordered
</th>
<th>
Product Price
</th>
<th>
Total Cost
</th>
</tr>
<?php
for($i=1; $i<=$sess_Itempointer; $i++)
{
echo"<tr>
<td>
$ses_basket_name[$i]
</td>
<td>
$ses_basket_quantity[$i]
</td>
<td>
$ses_basket_price[$i]
</td>
<td>
$ses_basket_cost[$i]
</td>
</tr>";
}
?>
<tr>
<th colspan = 3>
Total Cost in Shopping Cart
</th>
<td>
<?php echo $ses_basket_tcost; ?>
</td>
</tr>
</table>
</div>
</p>
</body>
</html>
The error I get is:
Warning: Unknown: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in Unknown on line 0
Besides this the previous session arrays dont get printed......
Thank you so much Once Again....