"; // here username will be the email of member wanting to login, which is the unique. if (($email != "" || $password != "") && $validated == false) { // username and password are set, we connect to database for validation require "$st_web_root" . "/includes/common/mySQL.connect.inc"; // open the database and set database object/global variables if ($st_database_error == "") // check for error occuring in the above included file { // variable st_sql is set to the SQL query to be excuted ... $st_sql = "select username, password from $st_tbClubLogin where username = '$username' and password = '$password'"; // echo "
".$st_sql."
"; $h1SQL = mysql_query($st_sql, $hmSQL); // variable hSQL is the handle to the result of the sql query. if ($h1SQL > 0) // if > 0, then the query is successful... { if (mysql_num_rows($h1SQL) != 1) // email is unique and is used as username. { $st_database_error = "Login Failed."; } else { // set the cookies: readplayMember. $ar_field = mysql_fetch_array($h1SQL); // email is the username of the member. // path is /scripts/admin/. // since php does not allow call of the function setcookie after header's been sent so redirect to another page which will // set the cookie and again redirect to site_category.php3 // setcookie("readplayMember", $ar_field["email"], 0, "/scripts/admin/"); // we indicate that the user login is validated, hence we can redirect user to home.php3 $validated = true; if($validated == true) { $returned_username = $ar_field["username"]; echo ""; // open the database and set database object/global variables exit; } } } } } require "$st_web_root" . "/includes/common/mySQL.close.inc"; // close database ?> "; else echo ""; exit; // prevent display of the rest of the page } ?>


 

// // ?>
Already a member?  
To proceed, please login
Username
Password
".$st_database_error.""; ?>


Become a member
If you are not already a member, and want to register immediately continue