[Tutor] Help with CGI login

Lance E Sloan lsloan@umich.edu
Fri, 17 Aug 2001 09:48:25 -0400


"James" wrote:
> I tried this, but the fields seem to be hidden from view when logging in.
> I've been trying to figure out the fields from the html source for the page,
> but haven't got it right yet.
> 
> Here's some snips of the relevant (i think) html source:
> <form method="post" action="customer" NAME="the_form" onSubmit="test_js();">

What does the JavaScript test_js() do?  You should look at that, it may
be important, seeing as there's a hidden field in the form with
"js_test" as the name.

> <input type=hidden name="login" alt="Subscriber Login"
> value="subscriber_login">
[...]
> <INPUT TYPE=HIDDEN NAME="login" VALUE="customer_login">
> <INPUT TYPE=HIDDEN NAME="js_test" VALUE="old">
> <INPUT TYPE=HIDDEN NAME="LEC" VALUE="">
> <input type="hidden" name="Act" value="NULL">

I would try adding all these hidden fields to your URL.

> <input type=image src="/images/login.gif" width=61 height=18
> value="Login" alt="Login" border=0>

I can't remember how this input would look when it's submitted.  It has
no "name" attribute, so it might not be submitted at all.  Who knows?

> I'm trying things like
> http://www.listbot.com/cgi-bin/customer?Act=login&customer_e_mail_login=emai
> l@addy.com&customer_password_login=mypass=
> manually with my browsers address bar.

Be sure to add those hidden fields!

--
Lance E Sloan
Web Services, Univ. of Michigan: Full-service Web and database design,
development, and hosting.  Specializing in Python & Perl CGIs.
http://websvcs.itd.umich.edu/ - "Putting U on the Web"