SineCosine
I'm still looking for my Tangent
- Reaction score
- 77
So..
Let's say I do not wanna' understand everything about registration and login for now because it is too overwhelming =x
And..
I wanna' understand the login part first.
Here are my questions..
01) User submits login form with Username and Password
02) User is redirected to a page that validates it
03) I use this to validate:
04) ???
I don't get what session_start() does ._.
Also, I don't know what to do after I've found a match
I can redirect them to a members-only page, sure..
But what's to stop them from skipping the login and going straight to the members-only page?
How would the members-only page know if a user has a session? o.0
Let's say I do not wanna' understand everything about registration and login for now because it is too overwhelming =x
And..
I wanna' understand the login part first.
Here are my questions..
01) User submits login form with Username and Password
02) User is redirected to a page that validates it
03) I use this to validate:
Code:
session_start();
$username = $_POST[‘Username’];
$password = $_POST[‘Password’];
$result = mysql_query("SELECT * FROM Members WHERE Username=$username AND Password=$password");
//Assuming no MD5
04) ???
I don't get what session_start() does ._.
Also, I don't know what to do after I've found a match
I can redirect them to a members-only page, sure..
But what's to stop them from skipping the login and going straight to the members-only page?
How would the members-only page know if a user has a session? o.0