PDA

View Full Version : simple login?


wheels187
09-01-2002, 07:59 AM
I am trying to do a simple login and password to just display who is currently visiting the website. Kind of like the "currently active users" part on the codingforums.com home page. I do not need to protect any parts of the site and if they have no login then they are labeled as a guest. I just need some direction and any help would be appreciated. Thanks in advance.

duniyadnd
09-01-2002, 12:30 PM
Php can handle what you're looking for. Check out the thread, and also look for session handling.

A good site that explains php (or rather, gives good examples) is

devshed.com (http://www.devshed.com)

THE reference site for php is Php.net (http://www.php.net)

Another way of going about this is cookies. You could use Javascript, php, perl to write your cookies, whatever you're comfortable with.

A good site about cookies is:

cookiecentral.com (http://www.cookiecentral.com)

Other first time tutorial sites can be found at

htmlgoodies.com
webmonkey.com (I think)

Duniyadnd

wheels187
09-01-2002, 09:34 PM
thanks for the info duniyadnd, I will try those out!

whackaxe
09-02-2002, 09:17 AM
your better off with PHP for cookies because the be honest JS cookies are a pain to work with. where in javascript you have to split() (or explode() in php) , with PHP you just use

thevar = $_COOKIE['varname'];

top get the variables out of the cookie
where as in JS

thevar = document.cookie
thevar = thevar.split("=")
pieces = thevar[1]

and that continues another couple of lines untill you get the cokkie vars into their own variable