hi, here are my login scripts:
<?
include("admin/db.php");
session_start();
$db_user = '';
$db_pass = '';
$nickname = $_POST['nickname'];
$password = $_POST['password'];
//connect to the DB and select the "single" database
$connection = mysql_connect('localhost', $db_user, $db_pass) or die(mysql_error());
mysql_select_db('single', $connection) or die(mysql_error());
//set up the query
$query = "SELECT * FROM sin_members
WHERE nickname='$nickname' AND password='$password'";
//run the query and get the number of affected rows
$result = mysql_query($query, $connection) or die('error making query');
$affected_rows = mysql_num_rows($result);
//if there's exactly one result, the user is validated. Otherwise, he's invalid
if($affected_rows == 1) {
$_SESSION['nickname'] = $nickname;
header("location:myaccount.php");
}
else {
header("location:index.php");
}
?>
But, when i compile this file, error occurred:
Warning: open(windows\tmp\sess_b891369a29d4437b3c6f93d5e047291f, O_RDWR) failed: No such file or directory (2) in C:\HTTPD\HTDOCS\single\memberlogin.php on line 4
Warning: Cannot add header information - headers already sent by (output started at C:\HTTPD\HTDOCS\single\memberlogin.php:4) in C:\HTTPD\HTDOCS\single\memberlogin.php on line 29
Warning: open(windows\tmp\sess_b891369a29d4437b3c6f93d5e047291f, O_RDWR) failed: No such file or directory (2) in Unknown on line 0
Warning: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (windows\tmp) in Unknown on line 0
😕
Can anyone pls help me? i have set session.save_path = windows\tmp in php.ini. i am using local omnihttpd to run this file.
pls help out!!!!!