View Full Version : Please help me!!! Urgently!!!

06-30-2005, 02:17 PM
Hi to all, Can anyone that know what the following codes mean pls reply. Thanks a lot.<!-- Instantiate the Counter bean with an id of "counter" -->
<jsp:useBean id="cart" scope="session" class="database.ShoppingCart" />
String id = request.getParameter("itemID");
String buttonPressed = request.getParameter("Submit");
String updatePressed = request.getParameter("input");
String quantity = request.getParameter("Sum");

if (updatePressed!=null){
cart.updateQuantity(id, Integer.parseInt(quantity));

if (buttonPressed!=null){



06-30-2005, 06:43 PM
Check to see if either of two conditions is true, if one of them is, do one thing, if the other is, do something else. The details of these conditions and actions are defined elsewhere but, hinted at by the variable, string variable and function names involved. To wit, the updating of the quantity of or removal of an item from the shopping cart based upon wether or not a particular button has been pressed. In the case of the item quantity, it is also based upon (most likely) a user supplied value. Of course, if these names are inappropriate to their actual uses, it could be just about anything.