Put all the inputs in one form
<div id="h3">
<h1> Little quiz </h1>
</div>
<br/>
<form action="pagefive.cgi" method="get">
Q1: Intermittent Fasting determines your food diet<br/>
<input type="radio" name="grp1" value="Incorrect">Yes<br/>
<input type="radio" name="grp1" value="Correct">No<br/>
Q2: You have two individuals, One who's diet consists of Mcnuggets f
+rom Mcdonalds.
And an invdivudal whose diet consists of clean food.
Both are at caloric deficit and are exercising.
Do you think the indivdual with the Mcnugget diet will lose weight ?
+<br/>
<input type="radio" name="grp2" value="Correct">Yes<br/>
<input type="radio" name="grp2" value="Incorrect">No<br/>
Q3: The more over weight you are, the more you will lose when you st
+art any excercise or diet program <br/>
<input type="radio" name="grp3" value="Correct">Yes<br/>
<input type="radio" name="grp3" value="Incorrect">No<br/>
<input type="submit" value="Submit">
</form>
#!/usr/bin/perl
use warnings;
use strict;
use CGI qw/:standard/;
use CGI::Carp qw/fatalsToBrowser/;
print header();
print start_html;
for my $n (1..3){
print p("Question $n is ".param('grp'.$n));
}
print end_html;
poj
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|