Create a log-in & log-out page

Anyone who can help me out with this!

I have a project to complete and I am implementing a user-case where I
have to create a loggin-in & logging-out page, is there anyone who has
done this before? And help me and my group to get this started, because
I and my group aint done this before.

Thank You.

Leena Jethwa wrote:

Anyone who can help me out with this!

I have a project to complete and I am implementing a user-case where I
have to create a loggin-in & logging-out page, is there anyone who has
done this before? And help me and my group to get this started, because
I and my group aint done this before.

Thank You.

print "enter your name: "
name = gets.chomp
exit if name != “Joe”

print "enter your password: "
passwd = gets.chomp
exit if passwd != “secret”
puts
puts “Welcome, %s” % name

–output:–
$ ruby r2test.rb
enter your name: Joe
enter your password: secret

Welcome, Joe

Presumably this is connected with access control, so you’ll need to
design a database to hold account details. Then you need to decide how
you are going to pass state information between successive pages. You
may use a cookie or transport some session id in your HTML.

You really need to do the ‘register-user’ use-case before you move onto
this one.