|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
update of session variable using <input> tags
im having a problem with my WML ediot shopping cart code
the default value of a certain <input> tag is taken from a session array [cart] 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 in the value of the session array (in case it is possible) 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> ------------------ Your help would much be appreciated |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > WAP Programming > update of session variable using <input> tags |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|