Create a log-in & log-out page

L

Leena Jethwa

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.
 
7

7stud --

Leena said:
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
 
M

Mike Stephens

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top