Hello:
things are getting much closer to actually working. <grin> This is the last thing I have to get done and I can call the project complete.
I am getting errors:
Fatal error: Call to undefined function: () in /validate.php on line 18
from this code:
<?php
session_start();
// Connects to sql server and logs in with username and password
$dbconnect here
// Selects all of the data from database
$sql_text = "SELECT * FROM users WHERE usrName = '$formUsername' AND password = '$formPassword'";
// execute query
$query = mysql_query($sql_text) or die (mysql_error());
// session checks and such
$logged_in = "no";
session_register("logged_in");
if ($mysql_num_rows($query) != 1) {
$SESSION["logged_in"] = "no";
header("Location: ./sorry.html");
exit();
}
else {
$SESSION["logged_in"] = "yes";
header("Location: ./family/index.html");
exit();
}
?>
basically I need to accomplish three things on two different pages.
1) pass login credential from form and validate against a DB table..if valid redirect to index.html else redirect to sorry.html
2) protect each page...if someone is valid let them in else redirect to login.html
3) on another page check if valid, if yes show naviation.inc else ignore the include.
Anyone that can help me? I really appreciate it, I am looking forward to understanding this stuff better and also calling this project "done"!
Thanks in advance.
Todd