Hi there. I have a product page (subscribe.php) which displays 3 different items. Product-A, Product-B, snd Product-C.
The items are displayed in an HTML table, and each product has a “Buy Me” submit button associated with it.
My form uses the following code:
<td><input type="submit" name="selectPlanA" class="button3" value="Buy Me" /></td>
<td><input type="submit" name="selectPlanB" class="button3" value="Buy Me" /></td>
<td><input type="submit" name="selectPlanC" class="button3" value="Buy Me" /></td>
Here is what I want to happen…
For my subscribe.php script, when the user clicks one of the “Buy Me” buttons, my subscribe.php will inspect the $_POST array and see which button was selected.
If a user clicked on the “Buy Me” button for either Product-A or Product-B, then the user should be routed to my checkout.php script.
If a user clicked on the “Buy Me” button for Product-C, then the user should be routed to productcatalog.php where the user gets to choose a free book.
The problem is that I’m not sure how to have my subscribe.php script figure out which button was chosen?
You help would be appreciated!!