471,872 Members | 1,451 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,872 software developers and data experts.

Dumping variables passed with SUBMIT

This is probably a simple thing to do, and it seems like I managed to
do this a few years ago, but I can't find a good example.

I'm trying to create a 'generic' page that I can call during my
testing, and it will take the variables passed by SUBMIT (not POST)
and display a web page showing all the variables and their values.

Does anyone have a good example that they would care to share? The
page will be on an Apache server, under *nix.

Brian

Apr 25 '07 #1
3 1874
Br*************@gmail.com said the following on 4/25/2007 1:37 PM:
This is probably a simple thing to do, and it seems like I managed to
do this a few years ago, but I can't find a good example.

I'm trying to create a 'generic' page that I can call during my
testing, and it will take the variables passed by SUBMIT (not POST)
and display a web page showing all the variables and their values.
A POST is a Submit, I think you mean a GET request.

For a GET, the parameters are in the URL, you simply read it and parse
the queryString.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Apr 25 '07 #2
On Apr 25, 5:59 pm, Randy Webb <HikksNotAtH...@aol.comwrote:
..
>
A POST is a Submit, I think you mean a GET request.
....
I know there are two ways to submit - one where the variables are
passed in the URL and the other they're passed in the body. I'my
trying to get the information from the body of the request.

There is a web page that someone else wrote and it is so convoluted I
can't figure out exactly what it is passing. I'd like to modify the
submit action in a copy of the page so it will direct to a web page
that will take the passed information and dump it to a web page, so I
can see what is happening.

Brian

Apr 26 '07 #3
Lee
Brian said:
>
On Apr 25, 5:59 pm, Randy Webb <HikksNotAtH...@aol.comwrote:
.
>>
A POST is a Submit, I think you mean a GET request.
...
I know there are two ways to submit - one where the variables are
passed in the URL and the other they're passed in the body. I'my
trying to get the information from the body of the request.

There is a web page that someone else wrote and it is so convoluted I
can't figure out exactly what it is passing. I'd like to modify the
submit action in a copy of the page so it will direct to a web page
that will take the passed information and dump it to a web page, so I
can see what is happening.
GET sends the values in the URL.
POST sends them in the body of the request.
You should see method="POST" as an attribute of the form tag.
If there's no method attribute, it defaults to GET.

The easy way to see POSTed values is to write (or find) a
server-side script in PHP, CGI, etc, that dumps the values
(along with the server's environment variables).
That's really beyond the scope of this newsgroup, though.
--

Apr 26 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by christopher.j.just | last post: by
4 posts views Thread by Cerebral Believer | last post: by
7 posts views Thread by amygdala | last post: by
103 posts views Thread by chochote | last post: by
NeoPa
reply views Thread by NeoPa | last post: by
reply views Thread by YellowAndGreen | last post: by
aboka
reply views Thread by aboka | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.