for a certain edit shopping cart that im coding i cant figure out something.the default value of a certain <input> tag is taken from a session array and i wish to edit such value. how can i edit the value in the input and at the same time automatically assign that new value to the session array without having to go to another card?so that as soon as the user edits the value inside the input tag it is automatically reflected
here's the code in case it cud b of help
<wml>
<card id="card" title="Edit Cart">
<do type="Accept" name="Accept">
<go href="Wcart.php?save=1">
</go>
</do>
<p>
<?php
include ('db.inc');
session_start();
if ($SESSION['cart']&&array_count_values($SESSION['cart']))
{
echo "<em>CART CONTENTS:</em>";
foreach ($_SESSION['cart'] as $scbpid => $qty)
{
$sql = "SELECT description from scbp WHERE SCBP_id=$scbpid";
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
$name = $row['description'];
echo "$name<input name='$scbpid' format='3N' value='$qty'/>";
}
}
else
echo "cart empty";
?>
</p>
</card>
</wml>
// bear with me