[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PHP and user login stuff



Jason Pincin wrote:
> 
> > include "connect.php3";
> > echo "<a href=\"/article314159$add2url\">";
> 
> Could someone expand on the thoughts here?

Well, it's just a way to avoid cookies once you're logged in. 
connect.php3 would set $add2url to something like user=bob,passwd=@!$@#
(encrypted).  Then whenever the PHP script generates a link, it would
automatically add that part to the link, thus preserving the login
status when the user clicks it.

Hmmm, on second thought maybe a password in the URL (encrypted or not)
isn't necessarily a good idea.

Basically, it's either
1.  This (which requires all pages be generated dynamically)
2.  The user enters handle/passwd EVERY time they do something requiring
it
3.  A cookie is stored on the user's system
4.  HTTP authentication (not necessarily a bad idea)

If we implemented #1, a cookie would not be needed BUT on the login form
there could be a check box "save me a cookie" like on Slashdot so that
when the login form was generated, it would automatically check for the
cookie.

Your idea of a temp cookie also has merit, so perhaps it should stay in
the DB.  I think that would be the only use of that field though.  The
DB doesn't need to know if the user has a permanent cookie.

> > > That's the point.  You have to impliement a cookie way and a non-cookie
> > > way.  Why do both?
> 
> I think it's desirable to impliment both.  If Micah doesn't want to impliment the
> cookie method now, thats fine, but at some point I'd want to go back and impliment
> it.  Thats up to Micah.  Just like you'll have some users complain about

Good idea - I'll probably start with what I described, then we can add
and/or change it later.

Also, the signup form is coming along.  There are a couple problems with
it that I'm trying to debug.  It's in my home directory now, in
public_html