ok im pretty newish to php & mysql im writing a members area for my site and i want to know how i can get it so they can login it gets that users info from the database and keeps it in its memory all teh time the suer is logged in so they can use certain pages of teh site i know it has something to do with sessions?
my idea is to have a basic 2 field html form like so:
Log In Page
Member ID
<br><input type="text" name="name">
<br><br>
Password
<input type="password" name="pword">
<input type="submit" value="Log-In"
Memberarea.php
<?php
include configuration.php
$id = $_POST['id'];
$pssword = md5($_POST['pword']);
$temp=mysql_query("SELECT * FROM $table1 WHERE id=$id AND pword=$pssword",$conn);
$num = mysql_num_rows($temp);
if ($num == 1)
{
Show Links to specific pages
}
else
{
exit("Sorry but it appears you do not have Correct rights to access this page");
}
?>
membershop.php
How do i get it so only people that vae logged in can use this page e.g. so that the info taken from memberarea.php is used on this page to authenticate the user and display the correct bank balance etc?