Hi every body
I have a quest that's is starting session to login page and then after to other pagest in the sight thats need tracking of singel users!!
And i have read all the faq but i still don't understand and i wounder i f some one can help me get a start on where i should being with or a exampel osw i see how it looks and how i begin...
where do i start with the functions?
every page thats need verification?
session_start();
session_register('username');
session_register('password');
here is my form for login.
<form action="/login/login.php" method="post" name="login">
Username:<br>
<input class="inputSidebar" type="text" name="username"<br>
Password:<br>
<input class="inputSidebar" type="password" name="password"><br>
<input class="button" type="submit" name="submit" value="Log in">
</form>
I used this php sktipt before! and now i wounder if i shoulde keep it to modifi it with session functions....
<?
$username=$POST["username"];
$password=$POST["password"];
include('mysqlcon.php');
$mysqlcon = "select * from reg_info where username = '$username' and password = '$password';";
$result = mysql_query($mysqlcon) or die("Query failed");
if (mysql_num_rows($result) == '1') {
print "<p><center><big><big>Welcome $username Please click <a href=\"index.php\">here to continue to flameline.com</big></big></center></p>";
}
else
{
print "<p><center><big><big>Sorry, incorrect Password $password. or Nickname $username.</big></big></center></p>";
print "<p><center><big>if not a member <a href=\"register.php\">click here to register</big></center></p>";
}
?>