in reply to Re: form problem...
in thread form problem...

This node falls below the community's minimum standard of quality and will not be displayed.

Replies are listed 'Best First'.
Re: Re: Re: form problem...
by waswas-fng (Curate) on Feb 26, 2004 at 16:45 UTC
    No one will write it for you, read the CGI.pm info listed above, and also consider using Apache::Session, it will allow you to store a state in your CGI app -- which should help facilitate your shopping cart.


    -Waswas
Re: Re: Re: form problem...
by Wonko the sane (Curate) on Feb 26, 2004 at 16:43 UTC
    my %in = $cgi_obj->Vars; # where $cgi_obj is whatever your CGI object +is. my $hidden_fields; # This for loop goes through each of the dvdX keys and creates an HTML + hidden field for them, appending each to the string of others. $hidden_fields .= $cgi->hidden( $_, $in{$_} ) for ( grep { /dvdX/ } ke +ys %in ); print start_form(-action=>'show.pl'); print table( {border=>1, -width=>'35%', -align=>'center', -style=>'bor +der: ridge lime; color: yellow; font-size: 20', -background=>'../data +/images/blue.jpg'}, Tr( {-align=>'center'}, td( 'Movie X' ), td( popup_menu(-name=>' +dvdX', -values=>[@tips] )), td( submit( 'Pick' ))), Tr( {-align=>'center'}, td( submit( 'Clear' )), td( submit( ' +Done' )))), br(), br(); print table( {border=>1, -width=>'35%', -align=>'center', -style=>'bor +der: ridge lime; color: yellow; font-size: 20', -background=>'../data +/images/blue.jpg'}, Tr( {-align=>'center'}, td( submit( 'Add' )), td( submit( 'Sh +ow' ))), Tr( {-align=>'center'}, td( submit( 'Modify' )), td( submit( 'De +lete' )))); # this is the string that contains all of the generated HTML hidden fi +elds we just made. print $hidden_fields; print end_form(), br(), br();
    If this still isnt making sense to you, then you should really take
    some time to go over to tutorials available on this site. As already siggested by others :)

    Best Regards,
    Wonko

    A reply falls below the community's threshold of quality. You may see it by logging in.