By clicking on "empty cart?", I am unsetting the cart array which is working fine. Now I wanted another form to be hidden if this "empty cart" button is clicked.

html:

```
<form id="f1" action="checkout.php" method="post">
    <input name="cust_login" type="submit" value="Continue" />
</form>    
<br>
<button><a href = "cart.php?cmd=emptycart">empty cart?</a></button>

```

javascript:

```
 <script>
 $(document).ready(function(){
     $("button").click(function(){
        $("#f1").hide();
     });
 });
 </script>

```

php code for unsetting array:

```
if (isset($_GET['cmd']) && $_GET['cmd'] == "emptycart") {
 unset($_SESSION["cart_array"]);

```

But hide is not working here. 

My question is, can we use button and link together as I have written ? If not, then how to implement it?