Hello,

I am having a problem understanding why I can't get the data from the form page to
CGI script.
Here is the page in question:
<http://www.coraconnection.com/paul_s/pages/catalog.html>



In the HTML
<form method="post" action="/cgi-bin/build_order.cgi">

<!-- there are several items of the form -->
<img src="../images/GUC-247-small.jpg" alt="GUC-247-small" width="120" height="179"> 
some descriptive text goes here..... 
<div class="item">
ORDER <input type="checkbox" name="hand-bag-style-dots" value="GUC-247-small" 
onclick="upDateQuantity()">
<br>
QUANTITY <input type="text" size="2" name="quantity" value="0" tabindex="26" 
onchange="checkNumber(this.value,0)">
</div>
------------

In the PERL
#!/usr/bin/perl -w
use CGI qw/:standard/;

new attempt: -- still not working !


@bags = param('handbag');  # get all of the bags styles
@bag_quantity = param('quantity');  # get all of the bags quantity 

my $count=0;

print qq|<table border="1">\n<tr>\n|; 
print qq|<th colspan="2">Description</th><th>Quantity</th><th>Price</th>\n|; 
print  "</tr>\n"; 


foreach my $bag (@bags){
    my ($description,$imgName)  =  split (/,/,$bag) if ($bag =~ m/,/); 
    print  "<tr>\n";
    print qq|<td><img src="../paul_s/images/| . $imgName . qq|.jpg" alt="$imgName" 
width="120" height="179" alt=" bag "></td>\n|;
    print  "<td>$description</td>";
    print  "<td>$bag_quantity[$count]</td><td>\$Price goes here</td>\n";
    print "</tr>\n";
    $count++;
}
print "</table>\n";

 


Old version that did not work,
#!/usr/bin/perl -w
use CGI qw/:standard/;
#.......  unrelated code removed  .......

print qq|<table border="1">\n|;

foreach $name (param()){
my $val= param($name);
my $nextRow = ($name =~ m/.jpg/);
print  "<tr>" if $nextRow; 
print qq|<td><img src="../paul_s/images/| . $val . qq|.jpg" alt="$name" width="120" 
height="179" alt=" bag "></td>\n|;
print  "<td>$name: $val</td>";
print  "<td>", param("quantity"), "</td><td>\$Price goes here</td>\n";
print "</tr>\n" if $nextRow;
}
print "</table>\n";

Please point out what I have done wrong.
Thanks
Dave Gilden 
( kora musician / audiophile / web master @ cora connection /  Ft Worth, Tx, USA)



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to