Forum Moderators: open

Message Too Old, No Replies

option 2 and 3 in form don't work

         

Lorel

7:00 pm on Mar 10, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hi,

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">

lZakl

11:35 pm on Mar 10, 2005 (gmt 0)

10+ Year Member



Lorel,

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

Lorel

3:46 pm on Mar 11, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



ok, thanks. I'll check into that.

rocknbil

6:20 pm on Mar 11, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



A common error for a beginner is the spelling and case of the form objects and the server-side programming are not identical.

<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.

Lorel

8:58 pm on Mar 11, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



It turns out the shopping cart company only allows a certain number of products and that was the problem and their prices are too high so we're looking for another co.

thanks for your help