i am sending is total php code before this i used only html code so kindly tell me where i am sending header before if condition or any white space waiting for repli
this warnig message is occuring
Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\RMS\login.php:8) in C:\wamp\www\RMS\login.php on line 97
<?php
$A=$_POST["text1"];
$B=$_POST["text2"];
$conn=odbc_connect('AKTMAPP','ERP_TEST','ERP_TEST');
$sql="SELECT 1 A FROM USERS WHERE USR_NAME='$A' and PASSWORD='$B'";
$rs=odbc_exec($conn,$sql);
$count = odbc_result($rs,"A");
if($count>0)
{
header("Location: login.php");
}
else
{
echo "invalid user name or password";
}
odbc_close($conn);
?>
page redirect
Moderator: General Moderators
Re: page redirect
This message only occurs if for any reason any characters are output before the header. Do a VIew Source on youyr browser and see if you see anything strange(like an error message). Also make sure that if you have any includes, they do not produce any characters. A common problem is when you have a file and close it with ?> but then enter a couple of empty lines.
Re: page redirect
Double post.
Locked.
Locked.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.