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