Page 1 of 1

Form action help

Posted: Sat Nov 20, 2004 8:05 pm
by C_Calav
hi guys, ive just finished a shopping cart and i need some help putting 2 url's into form buttons.

here are the two links:

Code: Select all

<a href="cart.php?action=remove_item&id=<?php echo $row&#1111;"itemId"]; ?>">Remove</a>

<a href="cart.php?action=empty_cart">-Empty Cart-</a>
now i need to put these into form buttons and i cant get it to work, here is what i have so far: (just for the remove cart so far)

Code: Select all

<form name="cart" method="GET" action=""> 

<input type="submit" value="Reset"  onclick="form.action=cart.php?action=empty_cart" class="button" /> 

<input type="submit" value="Continue" onclick="form.action='details.php'" class="button" /> 

</form>
the continue button works. but the Reset button doesnt. am i doing this the right way?

any help would be much appreciated! thanx

Posted: Sun Nov 21, 2004 12:19 am
by C_Calav
got it going, had to change get to post. thanx