in reply to Re: Params in CGI
in thread Params in CGI

Hi, but my question is the $name that you have initialized won't have scope outside this loop. I need to check the parameters before(to check whether the form has parameters) and after (to process) this loop. Any suggestions?

Thanks

Replies are listed 'Best First'.
Re^3: Params in CGI
by ccn (Vicar) on Nov 20, 2008 at 11:45 UTC

    Parameters are checked/validated _inside_ of that loop. $cgi->param('radioA1') returns false if that radio was not checked.

      Thats right, But Since the foreach and for loops are with in the form page, adding those lines will result in giving the users all the wells as missing before they enter anything. That is, it will load as:
      param A1 missing param A2 missing and so on....

      then with the table of 96 radio buttons. What I like to do is by someway get the parameters from the 96radio buttons (they have gt different radio buttons) I have tried by getting all the params in the form through  @names = $cgi->param() but that didn't fetch any parameters at all. Any better way please?
      thanks.