Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: basic login

by bigup401 (Pilgrim)
on Apr 14, 2017 at 16:35 UTC ( [id://1187943]=note: print w/replies, xml ) Need Help??


in reply to Re: basic login
in thread basic login

when i look at ur tutorial. it involves mysql. what am doing i dont want to call any database or session. i just want something simple if the login details are ok stay on same page display wanted content dont move away even if there are refresh until i command to logout

there are alot method for good login page. but am not looking for that. if u know php basic login . which doesn't involves calling database or using session

but finally i have got some idea it seems to work now

Replies are listed 'Best First'.
Re^3: basic login
by mr_mischief (Monsignor) on Apr 14, 2017 at 19:37 UTC

    Despite this being a Perl site, many of us are familiar as well with other languages including PHP. In PHP sessions are used for tracking logins from one page to the next. It can involve a database or it can be in the filesystem. It can also be in a keystore like memcached. All of those are also possible in Perl.

    Now it's possible to set a cookie and honor that cookie without tracking the session on the server side. That's actually quite simple to do. If you're not tracking it on the server side, though, you don't know if the cookie is forged. That is, unless you cryptographically sign a data structure on the server that includes a session ID, user ID, expiration, and such; then make sure the ciphered text is encoded to text (perhaps using something like base64); then store that in the cookie. Then when the cookie is returned the server can decode, then decrypt it, and check its validity. I doubt if you don't understand how basic sessions are tracked with existing support in the libraries though that you're quite ready to tackle that sort of solution.

Re^3: basic login
by Corion (Patriarch) on Apr 14, 2017 at 17:07 UTC

    If you don't want to use a database, use a file on the filesystem or a hardcoded check in your program.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1187943]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-04-25 07:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found