Forum Moderators: coopster
here is the form.
<form action="cart_new.php?action=add" method="post" id="cart">
<input type="text" name="qty1" size="3" value="1" maxlength="3" />
whats the best way to put them vars into a link
I have tried <a href="cart_new.php?action=add=qty1&1">
<input type="text" name="qty1" size="3" value="<?php echo $_GET['qty1']; ?>" maxlength="3" />
doing it with GET probably isn't the best choice though, because you'll have trouble changing the value to something else when they reload the page. (you'd have to change the url again, or it will just retake the old values.)
and what if the url has been amended and the variable isn't present? or if its a word instead of a number?
...and you probably just did a typo, but the link should be in this format
<a href="cart_new.php?action=add&qty1=1">
rather than
<a href="cart_new.php?action=add=qty1&1">
Couldnt see anything being carried over in address bar.
...and you probably just did a typo, but the link should be in this format
<a href="cart_new.php?action=add&qty1=1">
tried that but no success. Only way I can get it to work is through a form.
In the end I have had to just carry on using
<form></form>
for each box. so 3 forms on 1 page. Is there anything wrong doing it this way?