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

In reply to Re: cgi based quiz by poj
in thread cgi based quiz by sargg55

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.