Solved

Post Vs. Get

Posted on 1997-05-22
4
159 Views
Last Modified: 2013-12-25
I'm writing a cgi script and posts and gets to other cgi scripts.
I know the GET command does something like this:
blah.cgi?string=value&string=value <--and so on
How does a POST work? I'm trying to manually type it in the same way and it doesn't work.. please help me.
0
Comment
Question by:chiefarcher
  • 2
  • 2
4 Comments
 
LVL 3

Accepted Solution

by:
pc012197 earned 100 total points
ID: 1828064
With POST, the argument string is piped to the standard input of the CGI script. The format of the argument string is the same as in the GET command.
The command-line equivalent of a CGI call with POST is

echo "string=value&string=value..."|blah.cgi

0
 

Author Comment

by:chiefarcher
ID: 1828065
But How would I be able to post it to the browser...
would I do a
http://whatever.com?"string=value&string=value"|blah.cgi
or how would I type this?
0
 
LVL 3

Expert Comment

by:pc012197
ID: 1828066
You can't simply write it into the URL. Some servers support this (they don't really care if a request is GET or POST - they simply use both mechanisms to transfer data to the CGI script. Therefore, *sometimes* it works with a simple
http://whatever.com/blah.cgi?string=value
Ususally it doesn't, though.)

So if you want to call a CGI script with arguments you have to use a FORM with METHOD=POST.

0
 

Author Comment

by:chiefarcher
ID: 1828067
thanks pc... for my company, I'm releasing a "submit-it" type program.. The cool thing is the user only has to hit the "Submit" button one time.  The only thing I'm having problems with is server's that have "post" set up rather than "get"

thanks..
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

In this tutorial I will aim to show you how simple is making a small application in WhizBase, how to add, remove and update data in the DB. I will make a small address book application where you can add, browse, update and remove addresses. I wi…
In this tutorial I will show you how to make a simple HTML bar chart with the usage of WhizBase, If you want more information about WhizBase please read my previous articles at http://www.experts-exchange.com/ARTH_5123186.html (http://www.experts-ex…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now