--- Sara <[EMAIL PROTECTED]> wrote:
> Thanks for the quick respons, just need a bit more help. Now I need
> to write
> these values in a text file (I am fully aware of writing to files)
> but where
> I am gettin' confused is that : I told you that Name is a required
> field,
> but Email is optional. so what if :
>
> my @name = ('Sara', 'John', 'Doe'); # 3 names coming from form.
> my @email = ('[EMAIL PROTECTED]'); # coming from form as Email Optional
> field is
> ONLY filled for John.
>
> The problem is $name[0] does not corresponds with $email[0] and so
> on....
> Otherwise I would have used while or foreach for @name and @email to
> write
> it to file like it:
As of CGI.pm version 2.63, if the name is supplied in the query string
but has no value, CGI.pm should return an empty string for that. This
should let you keep your @name and @email arrays in synch. Even if you
are using a POST, there should be a query string in the entity-body and
CGI.pm *should* handle this correctly.
Cheers,
Ovid
--
If this message is a response to a question on a mailing list, please send
follow up questions to the list.
Web Programming with Perl -- http://users.easystreet.com/ovid/cgi_course/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>