Posted by sahm on 01/19/08 09:58
HI every one
I' try to send array from web page to php file
but no data are show
I'm using session to store data
and this is my code
////////////////////////////////////////////////////////////////////////
$data = $cart_items;
session_register('data');
foreach ($cart_items as $cart_item) {
echo "<tr>";
echo " <td><span class='style2'>".$cart_item->name."</span></td>";
echo " <td><span class='style2'>".$cart_item->description."</
span></td>";
echo " <td><span class='style2'>".$cart_item->price." S.R.</span></
td>";
echo " <td><span class='style2'>".$cart_item->quantity."</span></
td>";
echo " <td><span class='style2'>".$cart_item->price * $cart_item-
>quantity."</span></td>";
echo " <td><span class='style4'><a href='order.php?action=del&id=".
$cart_item->object_id."'>[del]</a></span></td>";
echo "</tr>";
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
\
and this is my php code to get the data
////////////////////////////////////////////////////////
<?php
foreach ($data as $item)
{
echo "<tr>";
print " <td><span class='style2'>".$item->name."</span></td>";
echo " <td><span class='style2'>".$item->description."</span></td>";
echo " <td><span class='style2'>".$item->price." $</span></td>";
echo " <td><span class='style2'>".$item->quantity."</span></td>";
echo " <td><span class='style2'>".$item->price * $cart_item-
>quantity."</span></td>";
echo "</tr>";
}
?>
\\\\\\\\\\\
whene this code is runing
it create table white correct number of row but no data is show
can any one help me white this
I will be thankful
Salim
Navigation:
[Reply to this message]
|