Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Is it possible to load a script, from a form element, which would include both the Get and Post function

I don't mean that exactly.. its just I have created a script that I pass arguements to using script.cgi?varible1|variable2

i need to create a form, that will still pass thoes arguments, plus extra variables that I will add using the form elements...

possible?

Replies are listed 'Best First'.
Re: Request Types
by princepawn (Parson) on May 24, 2001 at 07:06 UTC
Re: Request Types
by thpfft (Chaplain) on May 24, 2001 at 17:28 UTC

    The points above are important and useful - especially the sharp ones - but i don't think they really answer your question.

    I think what you need to know is that as long as you're using a sensible way to read the input to your script, then it doesn't matter whether it comes by GET or POST. but no, you can't do both at once.

    You're probably more familiar with the input taking the form of a query string, eg script.cgi?node=merlyn&mood=waspish, but the same data can passed from fields on a form. it ought to make no difference from the script's point of view. If some of those fields are not changeable by the user - perhaps they carry over from the form before this one - then just put them in hidden fields, as tachyon suggested before straying off the path of righteousness.

    but do use CGI. i used to use a home-made input parser which would have reduced merlyn to apoplexy had he ever seen it, and the discovery of CGI and its ubiquity, was a revelation. someone else had done the work for me, and better than i ever could. everything starts with cpan these days. you'll find it's very easy.

A reply falls below the community's threshold of quality. You may see it by logging in.