To answer you status question:  I would make the status column a date field and call 
it membership_expiration.  Then when you query the database you simply have to ask 
"where membership_expiration > curdate()".  With this you query will only return 
records where the membership_expiration is in the future.

That's the only one I can help you with.

Erik Tank
Bowne of Phoenix
Internet Services
602-817-4705


On Tue, 19 Mar 2002 18:37:10 +0000
"Will K." <[EMAIL PROTECTED]> wrote:

> I have a ton of questions about a project I am working on, so this may go 
> off-topic, but please help me if you can...  I am kind of... well, okay... a 
> LOT...  in over my head...  Apologies to those who don't want to go OT...  I 
> just don't know where else to turn...  It's kind of an admixture of Perl, 
> Database and Apache questions...
> 
> Here goes...
> 
> 1.) I was just reading up on Hamilton's tutorial here:
> http://www.cgi101.com/class/password/. She talks about setting up a database 
> with a "STATUS" column for expired membership accounts, but she doesn't have 
> anything on setting the time limits. For instance, if I want to set up a 
> membership site that allows my user's to register for a month, six months or 
> a year, then how do I get it set up so that the time limits, i.e. the 
> status, on their account is set and expires automatically and properly? 
> Anyone know of any good tutorials or scripts on or for this?
> 
> Next...
> 
> JH says to write htaccess files (for databases) like this:
> 
> Auth_MYSQL_DB usertable
> Auth_MYSQL_Password_Table users
> Auth_MySQL_Username_Field username
> Auth_MYSQL_Password_Field password
> Auth_MYSQL_Empty_Passwords Off
> AuthName "Members-Only Area"
> AuthType Basic
> 
> require valid-user
> 
> But I want to develop custom login error messages, and the code looks like 
> this:
> 
> ErrorDocument 500 http://foo.example.com/cgi-bin/tester
> ErrorDocument 404 /cgi-bin/bad_urls.pl
> ErrorDocument 401 /subscription_info.html
> ErrorDocument 403 "Sorry can't allow you access today"
> 
> so here are my (probably dumb) questions:
> 
> 2.) How many possible errors can there be? I'd prefer to cover all my bases.
> 
> 3.) Where do I set the coding for the error redirects? Just at the bottom of 
> the script?
> 
> 4.) If I use the database method, as opposed to .htpasswd, then do I still 
> have to use .htpasswd?
> 
> 5.) If mod_auth isn't installed on my server by my hosting service, then can 
> I just put the module in a CGI-BIN myself?
> 
> 6.) .htaccess files aren't showing up in my FTP client (WS_FTP) because they 
> don't have a name - aside from what comes after the "."  Is there a way to 
> configure WS_FTP to show the .htaccess file?
> 
> Thanks for any help,
> 
> Will
> 
> _________________________________________________________________
> MSN Photos is the easiest way to share and print your photos: 
> http://photos.msn.com/support/worldwide.aspx
> 



Reply via email to