A voir également:
- How to create a login sessions with php
- How to change qwerty to azerty - Guide
- How to change dns - Guide
- How to dual boot - Guide
- Mb to mo ✓ - Forum Matériel & Système
- Wfp to mp4 - Forum Accessoires & objets connectés
1 réponse
Hi,
login sessions ?! do you mean login script ?
Sessions are just a global variables that have a larger lifetime than normal variables (5 -> 30min, depending on the server configuration), nothing directly related to MySQL.
So let say you have a form that contains two text fields (username and password), after submitting the form, you have to :
1 - Check the fields content, if it's correct (not empty ... etc) ...
2 - Make a SELECT SQL query including the fields content, to check if the username and password exist in the database, if they do and match ...
3 - Create a user session to prove that the user have (already) been connected, so that you can show/hide/allow/deny the current user to do some actions.
You can for example put in the session the user id and rank (that have been recovered from the last query).
login sessions ?! do you mean login script ?
Sessions are just a global variables that have a larger lifetime than normal variables (5 -> 30min, depending on the server configuration), nothing directly related to MySQL.
So let say you have a form that contains two text fields (username and password), after submitting the form, you have to :
1 - Check the fields content, if it's correct (not empty ... etc) ...
2 - Make a SELECT SQL query including the fields content, to check if the username and password exist in the database, if they do and match ...
3 - Create a user session to prove that the user have (already) been connected, so that you can show/hide/allow/deny the current user to do some actions.
You can for example put in the session the user id and rank (that have been recovered from the last query).