Monks:
I am finishing up a PERL CGI ( assignment for a computer science class. I am almost done but I am stuck on these two last requirements:
-
1)
The answers to the questions should be appended to a comma seperated value (CSV) file on your server in a password protected web area.
-
2)
If the program is called with a query string of the form "ACTION=DELETE", ask the user for a name and password and if the name is "fishbreath" and the password "foobazz" then delete the CSV file
On requirement 1) I have already saved the form contents to a file in my password protected area that uses the functionality of the .htaccess file.
On requirement 2) I know how to check the query string for "ACTION=DELETE" but I do not know how to incorporate the password protection logon of the .htaccess protected area as part of the condition for file delition. Does anyone know if the logon prompt returns an Environment Variable I might be able to use? (a boolean or integer)? Anyway I am a little lost as to how I could implement this without having my cgi script redirect to another cgi logon form when the query string is "ACTION=DELETE" and so on and so forth (Easy way). Any help or suggestions is apreciated.
-thanks
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|