Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CGI encoding

Status
Not open for further replies.

meeble

Programmer
Sep 24, 2002
137
GB
When you have a form and pass data through, the data gets encoded in the URL.

I am doing a members bit on my site....

I have set up the user account jtfielding666666.I got help with the perl script which is not my forte!

Am I right in saying that the bit after the SID is jtfielding666666 encoded?


Are there programs where you can encode and decipher encoded URLs?

For example, could you decode this E2v0oGfWpws06HXjiCDq3w to make jtfielding666666

Or am I on the wrong track?

Cheers

James
 
Try changing your form method to post. This will pass the variables in a form collection and not the url. You access these (in ASP) with the Request.Form("name") method.

ToddWW
 
If you're using perl, here's an easy way to access the fields from your web page:

Code:
#!/usr/bin/perl -w    [COLOR=red] change to suit your needs[color]

use CGI qw(:standard);
use CGI::Carp qw(fatalsToBrowser);

my $user = param("username");
my $pw = param("password");

The user name and password are now the variables $user & $pw. You can use them any way you want in the rest of your script. Like Todd points out, change your HTML page so that the form tag METHOD is POST, not GET.

Smooth sailing from there....

There's always a better way. The fun is trying to find it!
 
How exactly are words encoded and decoded?

How does E2v0oGfWpws06HXjiCDq3w become jtfielding666666?

I haven't done any code to do this...

Cheers

James
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top