Warning: Cannot modify header information - headers already sent by (output started at /usr/home/philcrosoft/fokebox.com/www/admin/config.inc:15) in /usr/home/philcrosoft/fokebox.com/www/admin/loginproc.php on line 21
вот сам код:
<?php
// Inialize session
session_start();
// Include database connection settings
include('config.inc');
// Retrieve username and password from database according to user's input
$login = mysql_query("SELECT * FROM login_admin WHERE (user_name = '" . mysql_real_escape_string($_POST['user_name']) . "') and (user_pass = '" . mysql_real_escape_string(md5($_POST['user_pass'])) . "')");
// Check username and password match
if (mysql_num_rows($login) == 1) {
// Set username session variable
$_SESSION['user_name'] = $_POST['user_pass'];
// Jump to secured page
header('Location: securedpage.php');
}
else {
// Jump to login page
header('Location: index.php');
}
?>
что не так?