Monday, May 24, 2010

Problems with perl code for my website, please help.?

I am working on my companies website and I can't seem to be able to read in the chosen radio buttons or popup menu from user and send them to a certain link depending on what was chosen. When i type params() or getValue() it does not display anything that comes after it on the site. I am using perl for a site running on Internet Information Service and using OBDC and sql, so I can't seem to find a proper loop that will make this work.

Problems with perl code for my website, please help.?
I'm not sure what you're using for PERL libraries, and it's been a while since I worked with PERL, but assuming you're using STDIN to process the form elements, it would go something like this to read a radio button value:





#!/usr//bin/perl -w





do "cgi-lib.pl" || die "Cannot Start CGI-LIB\n";


%26amp;ReadParse;





$sInput= $in{'radiobutton'};





if($sInput == "hello" )


{


print "hello is selected";


}


elsif( $sInput == "goodbye" )


{


print "goodbye is selected";


}


else


{


print "nothing is selected";


}





I'm not sure what you mean by "popup menu," so I can't be much help on that.
Reply:I would recommend dodging the issue entirely and installing Drupal. Why reinvent the wheel?





http://www.drupal.org/


No comments:

Post a Comment