Forum: Ruby Create a log-in & log-out page

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Leena J. (Guest)
on 2009-05-01 17:15
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.
7stud -. (Guest)
on 2009-05-01 17:57
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
Mike S. (Guest)
on 2009-05-01 18:19
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.
This topic is locked and can not be replied to.