Jump to content


Photo

HELP PLEASE


  • Please log in to reply
3 replies to this topic

#1 eric07

eric07
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 02 May 2006 - 05:36 PM

I keep getting this error in my browser:

Warning: Cannot modify header information - headers already sent by


What I have done is i have an input form which action is to do a run a query. I put in code to into query that if the number of records is >0 then go to page1 else page2 but for some reason it doesn't work.

if (mysql_num_rows($lecturer) > 0) {

header ("Location: page1.php");
exit;
} else {

header ("Location: page2.php");
exit;
}

#2 Kris

Kris
  • Staff Alumni
  • Advanced Member
  • 2,755 posts
  • LocationThe Internet

Posted 02 May 2006 - 05:49 PM

Have you read the two pinned topics in this forum regarding header problems?

#3 eric07

eric07
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 02 May 2006 - 06:08 PM

[!--quoteo(post=370621:date=May 2 2006, 12:49 PM:name=SemiApocalyptic)--][div class=\'quotetop\']QUOTE(SemiApocalyptic @ May 2 2006, 12:49 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
Have you read the two pinned topics in this forum regarding header problems?
[/quote]


No, where can I find it?

#4 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 02 May 2006 - 06:14 PM

[a href=\"http://www.phpfreaks.com/forums/index.php?showforum=12\" target=\"_blank\"]http://www.phpfreaks.com/forums/index.php?showforum=12[/a]

right at the top of the list, and third in the list
Legend has it that reading the manual never killed anyone.
My site




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users