![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Nov 2005
Posts: 5
Rep Power: 0
![]() |
Php Login System
Allright well a login system is what I have to do next... So To start I have a question. How does the code know that your logged in?
|
|
|
|
|
|
#2 |
|
Professional Programmer
|
a cookie or a session. Cookie is the most preferred.
|
|
|
|
|
|
#3 |
|
Newbie
Join Date: Nov 2005
Posts: 5
Rep Power: 0
![]() |
Ah i see...
|
|
|
|
|
|
#4 | |
|
Programming Guru
![]() Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 4
![]() |
Quote:
A session is a device which ties a series of HTTP requests together, using a cookie or GET/POST variable. |
|
|
|
|
|
|
#5 | |
|
Professional Programmer
|
Quote:
|
|
|
|
|
|
|
#6 | |
|
Programming Guru
![]() Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 4
![]() |
Quote:
|
|
|
|
|
|
|
#7 | |
|
Professional Programmer
|
Quote:
|
|
|
|
|
|
|
#8 | |
|
Programming Guru
![]() Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 4
![]() |
Quote:
|
|
|
|
|
|
|
#9 | |
|
Professional Programmer
|
Quote:
![]() |
|
|
|
|
|
|
#10 |
|
Hobbyist Programmer
|
the webserver has a setting for php which decides to store sessions as cookies only, or as cookies first and get/post as fallback, or just get/post. GET is pretty insecure to have your information in.
Normal login steps are. Have a form to enter login information Send form via POST to a php script Have the php script verify login information Have the script start a session (search for session at php.net for functions) with your username or some other identifier Whenever you need to use that information, access it through $_SESSION['variable']
__________________
#programmingforums relay - http://thegupstudio.com/cgi-bin/pforelay.cgi freelance scripts - http://ryanguthrie.com/index.html |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|