Please forgive me. I'm not much of a coder. I need help with my portfolio website - there's a lot of HTML in here to sort through but I'm wondering if there's something wrong with my switch statement.
So this is the code for a paypal button. When the user submits the form it returns "12.00," the default value, as the print cost regardless of which radio button the user clicks on.
print "<tr><td colspan="2">
So this is the code for a paypal button. When the user submits the form it returns "12.00," the default value, as the print cost regardless of which radio button the user clicks on.
print "<tr><td colspan="2">
[Error: Irreparable invalid markup ('<input [...] fast,>') in entry. Owner must fix manually. Raw contents below.]
Please forgive me. I'm not much of a coder. I need help with my portfolio website - there's a lot of HTML in here to sort through but I'm wondering if there's something wrong with my switch statement.
<lj-cut text="the code">
So this is the code for a paypal button. When the user submits the form it returns "12.00," the default value, as the print cost regardless of which radio button the user clicks on.
print "<tr><td colspan=2><form target=paypal action=https://www.paypal.com/cgi-bin/webscr method=post><div class=bodytype>";
print "<input type=hidden name=cmd value=_cart>";
print "<input type=hidden name=add value=1>";
print "<input type=hidden name=business value=___________________>";
print "<input type=hidden name=undefined_quantity value=1>";
print "<input type=radio name=item_name value=4x6PrintUnframed>4x6<br>";
print "<input type=radio name=item_name value=5x7PrintUnframed>5x7<br>";
print "<input type=radio name=item_name value=8x10PrintUnframed>8x10<br>";
print "<input type=radio name=item_name value=11x14PrintUnframed>11x14<br>";
switch ($item_name):
case "4x6PrintUnframed":
print "<input type=hidden name=amount value=12.00>";
break;
case "5x7PrintUnframed":
print "<input type=hidden name=amount value=26.00>";
break;
case "8x10PrintUnframed":
print "<input type=hidden name=amount value=38.00>";
break;
case "11x14PrintUnframed":
print "<input type=hidden name=amount value=64.00>";
break;
default:
print "<input type=hidden name=amount value=12.00>";
endswitch;
print "<input type=hidden name=no_shipping value=2>";
print "<input type=hidden name=return value=http://www.monkfoto.com/store.php?itemvalue=99>";
print "<input type=hidden name=currency_code value=USD>";
print "<input type=hidden name=bn value=PP-ShopCartBF>";
print "<input type=hidden name=on0 value=Requested Print>Please Indicate Desired Photo: <input type=text name=os0 maxlength=200></div></td></tr>";
print "<tr><td><input type=image src=https://www.paypal.com/en_US/i/btn/x-click-but22.gif border=0 name=submit alt=Make payments with PayPal - it's fast, free and secure!>";
print "</form></td></tr>";
Can you guys help? If this isn't the right place for this post, feel free to delete. Thanks.
</lj-cut>
<lj-cut text="the code">
So this is the code for a paypal button. When the user submits the form it returns "12.00," the default value, as the print cost regardless of which radio button the user clicks on.
print "<tr><td colspan=2><form target=paypal action=https://www.paypal.com/cgi-bin/webscr method=post><div class=bodytype>";
print "<input type=hidden name=cmd value=_cart>";
print "<input type=hidden name=add value=1>";
print "<input type=hidden name=business value=___________________>";
print "<input type=hidden name=undefined_quantity value=1>";
print "<input type=radio name=item_name value=4x6PrintUnframed>4x6<br>";
print "<input type=radio name=item_name value=5x7PrintUnframed>5x7<br>";
print "<input type=radio name=item_name value=8x10PrintUnframed>8x10<br>";
print "<input type=radio name=item_name value=11x14PrintUnframed>11x14<br>";
switch ($item_name):
case "4x6PrintUnframed":
print "<input type=hidden name=amount value=12.00>";
break;
case "5x7PrintUnframed":
print "<input type=hidden name=amount value=26.00>";
break;
case "8x10PrintUnframed":
print "<input type=hidden name=amount value=38.00>";
break;
case "11x14PrintUnframed":
print "<input type=hidden name=amount value=64.00>";
break;
default:
print "<input type=hidden name=amount value=12.00>";
endswitch;
print "<input type=hidden name=no_shipping value=2>";
print "<input type=hidden name=return value=http://www.monkfoto.com/store.php?itemvalue=99>";
print "<input type=hidden name=currency_code value=USD>";
print "<input type=hidden name=bn value=PP-ShopCartBF>";
print "<input type=hidden name=on0 value=Requested Print>Please Indicate Desired Photo: <input type=text name=os0 maxlength=200></div></td></tr>";
print "<tr><td><input type=image src=https://www.paypal.com/en_US/i/btn/x-click-but22.gif border=0 name=submit alt=Make payments with PayPal - it's fast, free and secure!>";
print "</form></td></tr>";
Can you guys help? If this isn't the right place for this post, feel free to delete. Thanks.
</lj-cut>
