Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

checkbox query in CGI

by RajNaidu (Novice)
on Sep 09, 2009 at 04:22 UTC ( #794264=perlquestion: print w/ replies, xml ) Need Help??
RajNaidu has asked for the wisdom of the Perl Monks concerning the following question:

I have a CGI form in the below tabular format , with checkbox present only in T1 column. 
In this form , if the checkbox is checked, how do I get the checked value ?
--------------------------------- T1 | T2 | T3 | T4 ------------------------------- | | | ------------------------------- | | | -------------------------------

Comment on checkbox query in CGI
Download Code
Re: checkbox query in CGI
by ysth (Canon) on Sep 09, 2009 at 04:58 UTC
    It's hard to tell what part you are having trouble with, so I'm just going to take wild guess. Assuming you have a checkbox in each column, like:
    <input type="checkbox" name="T1" value="row1"> <input type="checkbox" name="T1" value="row2"> <input type="checkbox" name="T1" value="row3"> ...
    in perl, you would get a list of the values for which the checkbox is checked by @values = CGI::param("T1");
    --
    A math joke: r = | |csc(θ)|+|sec(θ)|-||csc(θ)|-|sec(θ)|| |
    Online Fortune Cookie Search
    Office Space merchandise
      Hi, Thanks for the reply. I have two CGI forms, basically. The values checked in one form should be made visible in the other form. Is there a way in CGI to achieve this. -Rajini
        Yes. The simplest way is to have the form action for the first form be a CGI script that generates the second form, doing whatever it needs to do to make the values visible. You probably want to read the CGI doc and look at some examples, then try to write the code.
        --
        A math joke: r = | |csc(θ)|+|sec(θ)|-||csc(θ)|-|sec(θ)|| |
        Online Fortune Cookie Search
        Office Space merchandise

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://794264]
Approved by planetscape
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2014-08-01 04:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (256 votes), past polls