Re: [PBML] Skip get arguments on the URL
- Hi Randal,
I think my bad english is getting on the way. What
you have done is capturing the URL and breaking it. I
actually want my original cgi script to work even if
somebody invoked it without listing all the arguments.
That way people can link to dynamic pages generated
by the cgi script without having to link to these
enormous URLs. For example if I punch in the URL on a
my cgi script does not work. I actually have to
mention all the other arguments with the default or
empty values like this:
The question is if there is a way to invoke a cgi
script by skipping the rest of the arguments.
--- "Randal L. Schwartz" <merlyn@...>
> >>>>> "Dinos" == Dinos Liolios <dinos007@...>www.i-dinos.com
> Dinos> Once again always to the rescue. I am afraid
> I did
> Dinos> not make myself clear on the previous email.
> My cgi
> Dinos> script sets default values as '' and then the
> Dinos> query skips those parameters. My problem is
> that I
> Dinos> want to invoke my cgi script from the URL
> without any
> Dinos> of the parameters except the one I am
> searching with.
> Dinos> Is this possible? So let's say that the form
> has two
> Dinos> cgi params, param1 and param2. So the GET
> URL would
> Dinos> be
> Dinos> search.cgi?param1=¶m2=something if I
> wanted to
> Dinos> search only by param2. If I type
> Dinos> search.cgi?param2=something the cgi script
> does not
> Dinos> work. But that would be very convenient
> cause my
> Dinos> friend needs to set all params to nothing
> which makes
> Dinos> his html code very cumbersome. Is there a
> way to chop
> Dinos> the GET URL?
> That is exactly what my code does. I used your
> example which had a lot of
> non-empty things. If you had given a different
> example URL, it would have
> worked more like you wanted.
> Randal L. Schwartz - Stonehenge Consulting Services,
> Inc. - +1 503 777 0095
> Perl/Unix/security consulting, Technical writing,
> Comedy, etc. etc.
> See PerlTraining.Stonehenge.com for onsite and
> open-enrollment Perl training!
>>>>> "Dinos" == Dinos Liolios <dinos007@...> writes:Dinos> I think my bad english is getting on the way. What
Dinos> you have done is capturing the URL and breaking it. I
Dinos> actually want my original cgi script to work even if
Dinos> somebody invoked it without listing all the arguments.
Oh... so you have the *short* version for input and want to generate
the *long* version for output?
Yeah, that really wasn't clear.
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!