Want to use url to post the data in form.

H

Hongyi Zhao

Hi all,

I want to construct a url to do the same thing that a post form done,
e.g., username and password, is the data submitted by the form. What
should I do then just a constructed url to do the same thing?

Let me describe my issue in more detail:

Take the following url as a example:

http://proquest.umi.com/pqdweb

My institute is a subscriber of it and I've a username and pssword of
this library. In my case, I find that I've two choices to log into
it:

1- Go to the above url, and then fill the logon form by my username
and pssword, finally, click on the connect button.

2- Alternatively, I can only use the following url to logon:

http://proquest.umi.com/pqdweb?RQT=301&UserId=myusername&Passwd=mypssword&JSEnabled=1

where, the _myusername_ and _mypssword_ are the login credentials
of mine.

So, I want to konw the map rule from the first method to the the
second, i.e., construct a url to do the same thing as a post form
done.

Regards,
 
H

Harlan Messinger

Hongyi said:
Hi all,

I want to construct a url to do the same thing that a post form done,
e.g., username and password, is the data submitted by the form. What
should I do then just a constructed url to do the same thing?

Let me describe my issue in more detail:

Take the following url as a example:

http://proquest.umi.com/pqdweb

My institute is a subscriber of it and I've a username and pssword of
this library. In my case, I find that I've two choices to log into
it:

1- Go to the above url, and then fill the logon form by my username
and pssword, finally, click on the connect button.

2- Alternatively, I can only use the following url to logon:

http://proquest.umi.com/pqdweb?RQT=301&UserId=myusername&Passwd=mypssword&JSEnabled=1

where, the _myusername_ and _mypssword_ are the login credentials
of mine.

So, I want to konw the map rule from the first method to the the
second, i.e., construct a url to do the same thing as a post form
done.

IF the application that processes the submitted form doesn't distinguish
between data sent in a POST request and and data included in the URL in
a GET request, you can use a query string of the form
field1Name=field1Value&field2Name=field2Value& ...
&fieldnName=fieldnValue for the names and values of each of the n fields
in the form. But if the application is set up to process only posted
data, then there *is* no way to create a URL that will automatically
work in a GET request.
 
A

Adrienne Boswell

Gazing into my crystal ball I observed Hongyi Zhao
Hi all,

I want to construct a url to do the same thing that a post form done,
e.g., username and password, is the data submitted by the form. What
should I do then just a constructed url to do the same thing?

Let me describe my issue in more detail:

Take the following url as a example:

http://proquest.umi.com/pqdweb

My institute is a subscriber of it and I've a username and pssword of
this library. In my case, I find that I've two choices to log into
it:

1- Go to the above url, and then fill the logon form by my username
and pssword, finally, click on the connect button.

2- Alternatively, I can only use the following url to logon:

http://proquest.umi.com/pqdweb?RQT=301 &UserId=myusername&Passwd=mypsswo
rd&JSEnabled=1

3. Use Opera's wand feature which will store your login creditials, and
just hit the wand or Ctrl-Enter. Or use Firefox which will do the same.
where, the _myusername_ and _mypssword_ are the login credentials
of mine.

So, I want to konw the map rule from the first method to the the
second, i.e., construct a url to do the same thing as a post form
done.

Regards,

Both the post form data and querystring data consist of the same thing:
name/value pairs. If you were to loop through:

userId = myusername
Passwd = mypssword
JSEnabled = 1

The third value probably tells the server that you have javascript
enabled.

When you fill out a form, it sends the names of the fields with the
values to the server in a POST request. When the server receives a
querystring, the server receives a GET request.

The important thing here is what is done server side. The server must
know if it is looking for a post or get request, or sometimes both, and
then what to do with the data once it gets it. Usually, the information
is going to a database, where either values are verified or input.

This is also where it gets a little hairy. There is something called
SQL injection, where someone can use a malformed request (post, get or
cookies) to gain access to the database and create havoc - like
';DROP Table Members;

Please Google for SQL Injection and learn how to protect yourself.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top