marmite Posted April 24, 2007 Share Posted April 24, 2007 Sorry for all the posts today (already!). I have a form populated from the DB. The form additionally has input fields and a submit button. How do I refer to the objects of the form, e.g. price, that are not the input or the submit? I want to put them into a SESSION variable to populate the cart. I have tried using "object" notation, but I can't seem to refer to the object items using POST ??? <form action="/cart.php" method="post" id="mycart"> <td><object id='cart_pkg' name="cart_pkg"><? echo $row['packaging_desc']; ?></object></td> <td><object id='cart_msg' name="cart_msg"><? echo $row['packaging_message']; ?></object></td> <td align="center"><object id='cart_qty' name="cart_qty"><? echo $row['packaging_quantity']; ?></object></td> <td align="center"><object id='cart_cello' name="cart_cello"><? echo $row['packaging_cello']; ?></object></td> <td align="center">£<object id='cart_prc' name="cart_prc"><? echo number_format($row['packaging_price'],2,'.',''); ?></object></td> <td><input name="qty" type="text" id="qty" size="3" /></td> <td><input type="submit" value="go" id="submit5" name="submit5"></td> </form> So, e.g. $_POST['cart_pkg'] doesn't then work, while $_POST['qty'] does. Quote Link to comment Share on other sites More sharing options...
taith Posted April 24, 2007 Share Posted April 24, 2007 you cant refer to objects via $_POST... you'd need to have form inputs... <input type=text name=""> <input type=hidden name=""> <textarea name=""></textarea> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.