first timer question I hope someone can help with. I want to create a menu to enable people on my site to select a size of a Hoodie and then on clicking a button go to a specific URL per size to purchase. The code I have so far is below...it feel so close to working but I just don't have the experience to know where I am going wrong. Thanks for any help you can give:
<form action="" method="post">
<select name="Size">
<option value="">Select...</option>
<option value="S">Small</option>
<option value="M">Medium</option>
</select><input type="submit" name="submit"/>
</form>
<?php if(isset($_POST['submit']))
{ $Paylink = $_POST['Size'];
switch ($Paylink)
{ case "S" : header( "Location: https://buy.stripe.com/test_XYZ" );
break;
case "M" : header( "Location: https://buy.stripe.com/test_ABC" );
break;
}
}
?>