Hi all,
I am in need of help for a small script I wrote. It is a simple password script.
The user inputs a password, it is submitted, and then checked. If it is correct, a redirect, if not error message occurs.
Unfortunately, it is not working like it should be. I am using 'Param', and when the password is entered and submitted, nothing gets passed. I have others that work, but none are for passwords.
Here is my code
if (param()) {
my $pass_bob = param("pass_bob");
# verify correct password
if ($bob_pass eq "password") {
use CGI; print redirect("http://www.gailborden.info/services/bo
+b/bobqa.htm");
} else {
# print error page #
}
# If no password, get one from user
} else {
my $query = new CGI;
print $query->header( "text/html" );
print <<END_PASS;
<TITLE>B.O.B. Question Submission</TITLE>
<BODY BGCOLOR=\"#FFFFFF\"><font face=\"bazooka\" size=\"3\">
<center><h1>B.O.B. Q and A w/Suggestions Submission Form</h1>
<hr>
<form>
<p>Type Password
<p>
<input name=pass_bob size=20 type=password>
<p><input type=submit value=Submit name=S1>
<hr>
</form>
</font></body></html>
END_PASS
}
Joseph A. Ruffino
Automated Systems Assistant
Gail Borden Public Library District
270 N. Grove Ave
Elgin, Il, 60120
847-742-2411 x5986
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.