Hello Monks,
I'am trying to develop a database driver website that people will be able to order movies through it!
Well i am having trouble with the following code, i dont know how to make it work so ot be able to when the user picks a movie from the drop down menu then we will clikc the button pick next to it and then we will be able to choose another one for ie Movie 2 and so on until he hits the button Done. I want evry time the user presses the pick button the form index.pl to resubmit to itself but the prompt now will be the next movies for the user to pick. like this Movie 1 Pick resubmit Movie 2 Pick resubmit Movie 3 so that the visitor can pick as many movies as he likes until he pressed the Done button.
Any ideas on how to proceed on that?
open(IN, '<movies.txt') or die $!;
@tips = <IN>;
close(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' ))));
print end_form(), br(), br();
Thank tou all!