Gossamer Forum
Home : General : Perl Programming :

newbie questin about forms and POST method

Quote Reply
newbie questin about forms and POST method
just starting to learn perl and cgi scripting... I guess you can call it that.. anyway..

I have a very simple form one text field(named itemnr) and a submit button, I can extract the value in the textfield if I use the GET method, I use my $item = $msg->param('itemnr');

But if I use the POST method, that technique does not work... I was wondering, how do you extract the value when using POST method?



Thanx

~Chris
Quote Reply
Re: [nchris] newbie questin about forms and POST method In reply to
Using the param() method should work as you expected for both POST and GET.

See this quick demo I made:

http://adsql.com/.../demo.cgi?method=GET - GET demo

http://adsql.com/cgi-bin/demo.cgi - POST demo

http://adsql.com/...in/demo.cgi?source=1 - Source
Quote Reply
Re: [Paul] newbie questin about forms and POST method In reply to
thank you for the help I will use the code if you don't mind?



Thank you again
Quote Reply
Re: [nchris] newbie questin about forms and POST method In reply to
Sure.
Quote Reply
Re: [Paul] newbie questin about forms and POST method In reply to
If your going to learn to use CGI.pm, learn OO! =)

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] newbie questin about forms and POST method In reply to
I've already learned how to use it Wink ....I just didn't see the need for my quick demo.