in reply to Re: Getting arguments such as ?page=20 for web scripts
in thread Getting arguments such as ?page=20 for web scripts

This node falls below the community's threshold of quality. You may see it by logging in.
  • Comment on Re: Re: Getting arguments such as ?page=20 for web scripts

Replies are listed 'Best First'.
Re: Re: Re: Getting arguments such as ?page=20 for web scripts
by cacharbe (Curate) on Jan 08, 2002 at 23:19 UTC
    Assumes grep's code
    my %parameters; my @inputs = $q->param; foreach $item (@inputs){ $parameters{$item} = $q->param($item); }

    C-.

Re: Re: Re: Getting arguments such as ?page=20 for web scripts
by grep (Monsignor) on Jan 08, 2002 at 23:15 UTC
    Those param's come from your query string. You query string is created from your HTML form (or straight on the URL).
    <form METHOD="POST" ACTION="/cgi-bin/your_script.cgi" ENCTYPE="applica +tion/x-www-form-urlencoded"> <input type="text" name="param_name" > </form>

    if you want to look at your query string as it comes in.
    #!/usr/bin/perl -Tw use strict; use CGI; my $q = new CGI; print $q->header; print $q->query_string;


    grep
    grep> cd pub grep> more beer