Thanks!

> ----- Original Message -----
> From: "Bob Showalter" <[EMAIL PROTECTED]>
> To: "'Horace Franklin Jr.'" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
> Sent: Tuesday, March 25, 2003 3:23 PM
> Subject: RE: Help using %Hashes
>
>
> > Horace Franklin Jr. wrote:
> > > Help!
> > >
> > > I need help using %hashes to receive input from the form below.
> > >
> > > What changes would I make to the syntax of the commented lines below
> > > to do this?.
> >
> > Well, none. That code creates the form, which is a different matter from
> > receiving input from the form. When the form is submitted, the inputs
will
> > be encoded within the request body. It's up to your script to parse
those
> > into whatever data structures you see fit.
> >
> > If you're using the CGI module (and you should), you can suck all the
> > parameters into an array with the Vars method:
> >
> >    use CGI;
> >
> >    my $q = new CGI;
> >    my %params = $q->Vars;
> >
> > Now you can access individual params as:
> >
> >    $params{name}
> >    $params{email}
> >    $params{message}
> >
> > and the like. Is that what you want? Read the CGI docs for additional
info
> > on using Vars (you can get a tied hash for instance that lets you change
> > parameters).
> >
> > >
> > >
> > >        my $form = <<E_FORM;
> > >         <h3>Hello!</h3>
> > >         <form action="$url" method="post">
> > >  #      <p><b>My name is</b>: <input type="text" name="name"/></p>
> > >  #      <p><b>My E-mail is</b>: <input type="text" name="email"/></p>
> > >          <p><b>Message</b>:</p>
> > >  #      <p><textarea cols="30" rows="6" wrap="virtual"
> > >                 name="message"></p>
> > >          <p>Type your message here.
> > >          </textarea>
> > >          <input type="submit"></p>
> > >         </form>
> > > E_FORM
> > >
> > >     $form;
> >
> >
> > --
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to