Cannot modify header information - headers already sent by (
Posted: Fri Jun 06, 2008 12:19 am
Hi,
i m getting two variables from html page,
then fetching using that variables,
and then if condition,used header to connect the page.
please suggest whats wrong in my code.
please help me out.
i m getting two variables from html page,
then fetching using that variables,
and then if condition,used header to connect the page.
please suggest whats wrong in my code.
please help me out.
Code: Select all
<body>
<?php
include 'Config.php';
include 'opendb.php';
$ftxtpass=$_REQUEST[txtpass];
$ftxtuser=$_REQUEST[txtuser];
$result = mysql_query("SELECT * FROM serverdb2 WHERE username='$ftxtuser' and password='$ftxtpass' ");
$j="1";
$count=0;
if($result)
{
$dfuserid = $row["uid"];
if($dfuserid == $j)
{
header("Location:http://localhost/EmpControl/UIMain.jsp");
}else {
header('Location:http://localhost/EmpControl/viewtocheck1.php?jftxtuser=$ftxtuser&jftxtpass=$ftxtpass');
exit;
}
}else {
header("Location:http://localhost/EmpControl/reloginpage.jsp");
}
mysql_close($conn);
?>
</body>
</html>