Can I make this link in a href format (ahref ='...')?
<form action='add_to_card.php' method="POST">
<input type='hidden' name='id' value='<?php echo $id?>' />
<input type='submit' value='Add' />
</form>
I’ve tried
echo "<a href='add_to_card.php?id=$id'>Add</a>";
but it doesnt work.
And make sure that your form uses GET to parse variables.
As POST…
This way you can put your anchors anywhere and submit form1