Forum Moderators: open
I had a form that was working and need to add two options and can't get the two options to work (the form columns are arranged correctly but it doesn't add the items into the bill).
Each item needs to be sold for one price for those who can pick it up or another option for shipping unassembled and 3rd option for shipping assembled.
There is one column for the description and two more for price and quantity for each option, i.e., 7 columns. However when I try to test order one of the 2nd or 3rd options it doesn't include the name or price in the bill. Iff I add the visual description to each item the form will be too wide for the page so I hope that's not the reason it's not working.
Here is the code. Any suggestions?
<input type="hidden" name="item1" value="4ft widget">
<input type="hidden" name="description1" value="4 ft widget ">4 ft widget
</td><td align="center"><input type="hidden" name="cost1" value="350.00"> $350.00
</td><td align="center" width="10%"><input type="text" name="quantity1" size="2" value="">
</td><td align="center">
<input type="hidden" name="item1a" value="4ft Widget ShippedUA">
<input type="hidden" name="description1a" value="4 ft widget shipped unassembled"><input type="hidden" name="cost1a" value="395.00"> $395.00
</td><td align="center"><input type="text" name="quantity1a" size="2" value="">
</td><td align="center">
<input type="hidden" name="item1b" value="4ft widget ShippedA">
<input type="hidden" name="description1b" value="4 ft widget shipped assembled"><input type="hidden" name="cost1b" value="495.00"> $495.00
</td><td align="center"><input type="text" name="quantity1b" size="2" value="">
</td></tr><tr> <td align="center">
Are you sure that the error doesn't occure in the script the form is calling to? I tested what you had here in a php page, and I got all the items to list out...
I just copied and pasted your HTML, and sent it to the following PHP page.
<?
echo "$item1<br>";
echo "$description1<br>";
echo "$cost1<br>";
echo "$quantity1<br>";
echo "$<br><br><br>";
echo "$item1a<br>";
echo "$description1a<br>";
echo "$cost1a<br>";
echo "$quantity1a<br>";
echo "$<br><br><br>";
echo "$item1b<br>";
echo "$description1b<br>";
echo "$cost1b<br>";
echo "$quantity1b<br>";
?>
The fact that your HTML worked for me tells me that maybe it's the CGI the form is going to?
-- Zak
<input type="text" name="Description">
then submitted to the program, if it's looking for:
print "$qs{'description'}"
It does nothing, because Description and description are two different variable names. Just another thing to look for.