Seniors, help solve this problem
I made a login user's page, done well, in the case of a plain page, I gave it a login user authentication. The code is then generated on top of it.
if (!function_exists ("getsqlvaluestring")) {
function getsqlvaluestring ($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (Php_version < 6) {
$theValue = GET_MAGIC_QUOTES_GPC ()? Stripslashes ($theValue): $theValue;
}
$LoginRS __query=sprintf ("Select Username, userpsw from board_admin WHERE username=%s and userpsw=%s",
Getsqlvaluestring ($loginUsername, "text"), getsqlvaluestring ($password, "text"));
$LoginRS = mysql_query ($LoginRS __query, $boardConn) or Die (Mysql_error ());
$loginFoundUser = mysql_num_rows ($LoginRS);
if ($loginFoundUser) {
$loginStrGroup = "";
if (php_version >= 5.1) {session_regenerate_id (true);} else {session_regenerate_id ();}
Declare session variables and assign them
$_session[' mm_username '] = $loginUsername;
$_session[' mm_usergroup '] = $loginStrGroup;
if (Isset ($_session[' Prevurl ')) && true) {
$MM _redirectloginsuccess = $_session[' Prevurl ');
}
Header ("Location:".) $MM _redirectloginsuccess);
}
else {
Header ("Location:".) $MM _redirectloginfailed);
}
}
?>
But I'm browsing.
This error occurs on the page:
Warning:session_start () [Function.session-start]: Cannot send session cache Limiter-headers already sent (output Starte D at E:\appserv\www\webboard2\login.php:2) in E:\AppServ\www\webBoard2\login.php on line 5
Had foreseen such a problem before, it would have Validate request to login to this site.
if (!isset ($_session)) {
Session_Start ();
}
This section of the PHP code on the line, this time do not know how still not, to help solve the next, thank you
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.