Jump to content

[SOLVED] Error with header


mark110384

Recommended Posts

Can anyone see the problem with this to kick back the following header. I use a similar script further down in the script controlled by if statements.

 

$errornum ="empty_msg";

$sqlcount= "SELECT * FROM forum_reply WHERE topic_No = '$topic_id'";

		$count_result = mysql_query($sqlcount);

		$numrows = mysql_num_rows($count_result);

		$number_per_page = 14;

		$page_no = ceil($numrows/$number_per_page);


header("Location: showtopic.php?topic_selected=$topic_id&pagenum=$page_no&error_id=$errornum");

 

And the error

 

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\xampp\htdocs\Example\LoginExample\postreply.php on line 26

 

Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\Example\LoginExample\postreply.php:26) in C:\xampp\htdocs\Example\LoginExample\postreply.php on line 41

 

 

I can't see anything wrong with it I'm not echoing anything out.

Link to comment
https://forums.phpfreaks.com/topic/128830-solved-error-with-header/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.