|
Posted by geshan on 08/28/06 13:47
these are the errors i get,
Warning: session_start() [function.session-start]: Cannot send session
cookie - headers already sent by (output started at
D:\Xampp\xampp\htdocs\GM_PHP\includes\conn1.php:11) in
D:\Xampp\xampp\htdocs\GM_PHP\login_process.php on line 2
Warning: session_start() [function.session-start]: Cannot send session
cache limiter - headers already sent (output started at
D:\Xampp\xampp\htdocs\GM_PHP\includes\conn1.php:11) in
D:\Xampp\xampp\htdocs\GM_PHP\login_process.php on line 2
Warning: Cannot modify header information - headers already sent by
(output started at D:\Xampp\xampp\htdocs\GM_PHP\includes\conn1.php:11)
in D:\Xampp\xampp\htdocs\GM_PHP\login_process.php on line 38
i'm using xampp with php, Apache 2.2 and mysql 4.01
I'm posting the login_process.php file here, it is made for a login
system plesae help:
<?php
session_start();
include("includes/conn1.php");
?>
<?php
if(isset($_POST['Submit']))
{
$username=$_POST['txtusername'];
$password_frm=$_POST['txtpassword'];
//$users_in='';
if(!empty($username) && !empty($password_frm))
{
$sql="SELECT password FROM tbl_users WHERE user_name = '$username'
and user_status=1";
$users_in=mysql_query($sql) or die(mysql_error());
$pass_db=mysql_result($users_in,0,0);
/*while($user_valid=mysql_fetch_array($users_in))
{
//echo $user_valid['password'];
$pass_db= $user_valid['password'];
}
//still left to validate password
//while(
//$user_data=mysql_fetch_array($users_in);
//extract($user_in); */
if($pass_db==$password_frm)
{
//set session
$_SESSION['logged_in_username']=$username;
$_SESSION['user_status']="valid";
header("Location:logged_in.php");
//echo "logged in.";
}
else
{
header("Location:login.php?msg=pwerror");
//echo "Invalid PW.";
//echo $users_in['password'];
}
}
else
{
header("Location:login.php?msg=blank");
//echo "Error. blank";
}
}
else
{
header("Location:login.php?msg=illegal");
//echo "Empty not allowed.";
}
?>
The Code of conn1.php
<?php
$con=mysql_connect("localhost","root","") or die(mysql_error());
mysql_select_db("gesDB",$con);
//echo 'conncection succesful.';
?>
I need help. Please Help Fast
Navigation:
[Reply to this message]
|