Hi there

Im actualy kind of new in this and im trying to make this chekbox with quantity so i can send it to paypall.
But with these codes its not doing it like it should.
i want my clients to check the box(es) fill in the quantity and then pay.
Çan anybody tell me what i am doing wrong? or show me a better code

here are the codes

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<title>Button Example Code</title>

<!-- START META TAG SECTION -->
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<meta http-equiv="Content-Language" content="en">
<!-- END META TAG SECTION -->


<!-- Start of Script -->
<SCRIPT LANGUAGE="JavaScript"><!--

var count=1;

function codename() {
count=1;

document.formname.item_name_1.value='';
document.formname.item_name_2.value='';
document.formname.item_name_3.value='';
document.formname.item_name_4.value='';
document.formname.item_name_5.value='';
document.formname.amount_1.value='';
document.formname.amount_2.value='';
document.formname.amount_3.value='';
document.formname.amount_4.value='';
document.formname.amount_5.value='';
document.formname.quantity_1.value='';
document.formname.quantity_2.value='';
document.formname.quantity_3.value='';
document.formname.quantity_4.value='';
document.formname.quantity_5.value='';

if(document.formname.item1.checked)
{
document.formname.item_name_1.value = "Numb 1";
document.formname.amount_1.value = "1.00"*"quantity_1";
document.formname.quantity_1.value='';
count=count+1;
}
if(document.formname.item2.checked)
{
if(count==2){
document.formname.item_name_2.value = "Numb 2";
document.formname.amount_2.value = "1.00";
document.formname.quantity_2.value='';
count=count+1;
}
if(count==1){
document.formname.item_name_1.value = "Numb 2";
document.formname.amount_1.value = "1.00";
document.formname.quantity_1.value='';
count=count+1;
}
}
if(document.formname.item3.checked)
{

if(count==3){
document.formname.item_name_3.value = "Numb 3";
document.formname.amount_3.value = "1.00";
document.formname.quantity_3.value='';
count=count+1;
}
if(count==2){
document.formname.item_name_2.value = "Numb 3";
document.formname.amount_2.value = "1.00";
document.formname.quantity_2.value='';
count=count+1;
}
if(count==1){
document.formname.item_name_1.value = "Numb 3";
document.formname.amount_1.value = "1.00";
document.formname.quantity_1.value='';
count=count+1;
}
}
if(document.formname.item4.checked)
{
if(count==4){
document.formname.item_name_4.value = "Numb 4";
document.formname.amount_4.value = "1.00";
document.formname.quantity_4.value='';
count=count+1;
}
if(count==3){
document.formname.item_name_3.value = "Numb 4";
document.formname.amount_3.value = "1.00";
document.formname.quantity_3.value='';
count=count+1;
}
if(count==2){
document.formname.item_name_2.value = "Numb 4";
document.formname.amount_2.value = "1.00";
document.formname.quantity_2.value='';
count=count+1;
}
if(count==1){
document.formname.item_name_1.value = "Numb 4";
document.formname.amount_1.value = "1.00";
document.formname.quantity_1.value='';
count=count+1;
}
}

if(document.formname.item5.checked)
{
if(count==5){
document.formname.item_name_5.value = "Numb 5";
document.formname.amount_5.value = "1.00";
document.formname.quantity_5.value='';
count=count+1;
}

if(count==4){
document.formname.item_name_4.value = "Numb 5";
document.formname.amount_4.value = "1.00";
document.formname.quantity_4.value='';
count=count+1;
}
if(count==3){
document.formname.item_name_3.value = "Numb 5";
document.formname.amount_3.value = "1.00";
document.formname.quantity_3.value='';
count=count+1;
}
if(count==2){
document.formname.item_name_2.value = "Numb 5";
document.formname.amount_2.value = "1.00";
document.formname.quantity_2.value='';
count=count+1;
}
if(count==1){
document.formname.item_name_1.value = "Numb 5";
document.formname.amount_1.value = "1.00";
document.formname.quantity_1.value='';
count=count+1;
}
}

}
//-->
</SCRIPT>
<!-- End of Script -->



</head>

<body>

<!-- START SAMPLE CODE SECTION -->


<!-- PARAGRAPH 1 -->


<br><br>
Please Choose Your Number(s)

<br><br>

<form name="formname" target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<!-- If using a Business or Company Logo Graphic, include the "cpp_header_image" variable in your View Cart code. -->
<input type="hidden" name="cpp_header_image" value="https://www.yourwebsite.com/logo.jpg">
<!-- Replace "business" value with your PayPal Email Address or Account ID -->
<input type="hidden" name="business" value="chachileibah@gmail.com">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="upload" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="lc" value="US">
<!-- Replace value with the web page you want the customer to return to after a successful transaction -->
<input type="hidden" name="return" value="http://www.yourwebsite.com/ThankYou.html">
<!-- Replace value with the web page you want the customer to return to after item cancellation -->
<input type="hidden" name="cancel_return" value="http://www.yourwebsite.com/Cancel.html">
<input type="hidden" name="button_subtype" value="products">
<input type="hidden" name="no_note" value="0">
<input type="hidden" name="cn" value="Add special instructions to the seller:">
<input type="hidden" name="bn" value="PP-ShopCartBF:btn_paynowCC_LG.gif:NonHosted">
<input type="hidden" name="amount_1">
<input type="hidden" name="amount_2">
<input type="hidden" name="amount_3">
<input type="hidden" name="amount_4">
<input type="hidden" name="amount_5">
<input type="hidden" name="item_name_1">
<input type="hidden" name="item_name_2">
<input type="hidden" name="item_name_3">
<input type="hidden" name="item_name_4">
<input type="hidden" name="item_name_5">
<input type="hidden" name="quantity_1">
<input type="hidden" name="quantity_2">
<input type="hidden" name="quantity_3">
<input type="hidden" name="quantity_4">
<input type="hidden" name="quantity_5">

<table>
<tr>
<td>CheckBox&nbsp;&nbsp;</td>
<td>Number&nbsp;&nbsp;</td>
<td>Price&nbsp;&nbsp;</td>
<td>Quantity&nbsp;&nbsp;</td>
</tr>
<tr>
<td>&nbsp;&nbsp;<input type="checkbox" name="item1" value="Item 1"></td>
<td># 1&nbsp;&nbsp;</td>
<td>$1.00</td>
<td><input type="text" name="quantity_1" value=""/></td>
</tr>
<tr>
<td>&nbsp;&nbsp;<input type="checkbox" name="item2" value="Item 2"></td>
<td># 2&nbsp;&nbsp;</td>
<td>$1.00</td>
<td><input type="text" name="quantity_2" value=""/></td>
</tr>
<tr>
<td>&nbsp;&nbsp;<input type="checkbox" name="item3" value="Item 3"></td>
<td># 3&nbsp;&nbsp;</td>
<td>$1.00</td>
<td><input type="text" name="quantity_3" value=""/></td>
</tr>
<tr>
<td>&nbsp;&nbsp;<input type="checkbox" name="item4" value="Item 4"></td>
<td># 4&nbsp;&nbsp;</td>
<td>$1.00</td>
<td><input type="text" name="quantity_4" value=""/></td>
</tr>
<tr>
<td>&nbsp;&nbsp;<input type="checkbox" name="item5" value="Item 5"></td>
<td># 5&nbsp;&nbsp;</td>
<td>$1.00</td>
<td><input type="text" name="quantity_5" value=""/></td>
</tr>
</table>


<br>

<input type="button" value="Reset Form" onClick="this.form.reset()">

<br><br>

<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_paynowCC_LG.gif" border="0" name="submit" onclick="codename()" alt="Make payments with PayPal - it's fast, free and secure!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>


<!-- END BUTTON EXAMPLES -->



<!-- END SAMPLE CODE SECTION -->

<br><br><br><br>
<hr align="left" width="50%" noshade>
<br><br>
NOTES:
<br>



</body>
</html>