truenitin Posted July 5, 2006 Share Posted July 5, 2006 hiiii am using php5apache 2the following line of code header("location:login_success.php")gives the errorheader already senti tried ob_end_flush also , removed all the blank spaces also everything but it still keeps popping up Nitin This is an SOS Quote Link to comment https://forums.phpfreaks.com/topic/13731-header-problem-i-am-getting-frustrated-now/ Share on other sites More sharing options...
Orio Posted July 5, 2006 Share Posted July 5, 2006 Can you post the full script?Also, read here:http://www.phpfreaks.com/forums/index.php/topic,37442.0.htmlOrio. Quote Link to comment https://forums.phpfreaks.com/topic/13731-header-problem-i-am-getting-frustrated-now/#findComment-53296 Share on other sites More sharing options...
truenitin Posted July 5, 2006 Author Share Posted July 5, 2006 hii this is the script i am using <?phpob_start();require("data_conn.php");ob_end_flush();?><?phpob_start();$myusername=$_POST['myusername'];$mypassword=$_POST['mypassword'];$sql="SELECT * FROM members where username='$myusername' and password='$mypassword'" ;$result=mysql_query($sql);$count=mysql_num_rows($result);if($count==1){//session_register("myusername");//session_register("mypassword"); header("location:login_success.php");}else {echo "Wrong Username or Password";}ob_end_flush();?>i removed the session_register because it is also giving me the same errorwill sort that out when i get to the root of the problem.I am calling the above script in the formNitin Nitin Quote Link to comment https://forums.phpfreaks.com/topic/13731-header-problem-i-am-getting-frustrated-now/#findComment-53305 Share on other sites More sharing options...
Orio Posted July 5, 2006 Share Posted July 5, 2006 Why do you use the ob_start and ob_end_flush functions? And does data_conn.php output anything?Also make sure data_conn.php doesnt have any white spaces before the opening <?php and after the closing ?>Orio. Quote Link to comment https://forums.phpfreaks.com/topic/13731-header-problem-i-am-getting-frustrated-now/#findComment-53309 Share on other sites More sharing options...
truenitin Posted July 5, 2006 Author Share Posted July 5, 2006 hiii oriothank you very much Data_conn had some white spaces i removed them and it is working fine ....Thank you very much Nitin Quote Link to comment https://forums.phpfreaks.com/topic/13731-header-problem-i-am-getting-frustrated-now/#findComment-53316 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.