Setting query string - can it be done?

They have: 10 posts

Joined: Jun 1999

Is it possible to set the QUERY_STRING without following a link to script.pl?set string ?
Such as if the user submits a form it would go to script.pl?form

Any help woule be appreciated.

They have: 10 posts

Joined: Jun 1999

Well, if the user submits a form (using the post method) it will take them to ?form. And this query string will go to sub routine to do things with the data.

They have: 5,633 posts

Joined: Jan 1970

I'm not sure I understood you either, but if you post a form with the GET method, all the data will be sent through a query string (like action.pl?field1=value1&field2=value2 , etc.). If you only want to pass "form" as the query string, just set "script.pl?form" as the form action.

Regards,
Federico

----------
UBBdir.com -- Find the internet's best forums
WDresources.com -- Resources for the web developer

They have: 8 posts

Joined: Jun 1999

You can access the query string in $ENV{'QUERY_STRING'}

If you want to go to a specific subroutine if the script was called with script.cgi?one

if ($ENV{'QUERY_STRING'} eq "one") {
&SubOne;
}

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.