[ic] form post vs query string
mike at perusion.com
Wed Nov 19 13:21:34 EST 2003
Quoting Marc Brevoort (marc.brevoort at armazemdedados.com):
> The CGI tag gives me both posted variables and variables specified in
> the query string of the URL.
> I have a situation where it would be useful to be able to distinguish
> between them, is it possible to read variables only from either the set
> of posted form variables or the variables specified in the query string?
No, no way to do that, they are identical.
You can get access to the QUERY_STRING, though, in a UserTag, and
UserTag is_from_query Order name
UserTag is_from_query Routine <<EOR
my $name = shift;
my $re = qr/^$name=/;
my @pairs = split($Global::UrlSplittor, $CGI::query_string);
next unless $_ =~ $re;
At that point, you can do:
[if term="[is_from_query foo]"]
Of course if it is set multiple times, once in the query string
and once in the post, it will give a false positive.
Perusion -- Expert Interchange Consulting http://www.perusion.com/
phone +1.765.647.1295 <mike at perusion.com>
Few blame themselves until they have exhausted all other possibilities.
More information about the interchange-users