Jump to content


Photo

What does this error mean???


  • Please log in to reply
6 replies to this topic

#1 Immortal55

Immortal55
  • Members
  • PipPipPip
  • Advanced Member
  • 59 posts

Posted 11 September 2006 - 04:52 AM

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/theblizz/public_html/mitch/admin/editnews.php:10) in /home/theblizz/public_html/mitch/admin/editnews.php on line 11

I keep getting that? What does that mean, if you need the script let me know.

#2 hostfreak

hostfreak
  • Members
  • PipPipPip
  • Advanced Member
  • 581 posts

Posted 11 September 2006 - 05:12 AM

It means you have something before session_start(). It must be located at the top of the page under your initial <?php .

#3 Immortal55

Immortal55
  • Members
  • PipPipPip
  • Advanced Member
  • 59 posts

Posted 11 September 2006 - 05:17 AM

The only thing before that was basic HTML but that was before the <?php, and I took that out and still I am getting the same error....Any other ideas?

#4 kenrbnsn

kenrbnsn
  • Staff Alumni
  • Advanced Member
  • 8,235 posts
  • LocationHillsborough, NJ, USA

Posted 11 September 2006 - 05:19 AM

Please post the start of your script.

Ken

#5 Immortal55

Immortal55
  • Members
  • PipPipPip
  • Advanced Member
  • 59 posts

Posted 11 September 2006 - 05:24 AM

Alright actually I figured it out, I realized you cannot have any spaces at the start of the script.
Thanks a lot.

but new question

here is the script

<?
	session_start();
	
	include ('dbconnect.php');
  
  $conn = db_connect();
  $db = @mysql_select_db ("theblizz_mitchanderson", $conn)
          or die ("Registration failure, try again.");
			
			    $sql = mysql_query("SELECT * FROM news ORDER BY id DESC") or die(mysql_error());
	
	while($row = mysql_fetch_assoc($sql)){

//this next line will make all the array variables into normal variables - 
//if you had a "last_name" field in the database you could now call it simply by using $last_name
stripslashes(extract($row));

echo "" . $title . "</h3> - [<a href='deletenews.php?id='$id' target='main'>delete</a>] [<a href='updatenews.php?id='$id' target='main'>edit</a>]";
echo '<br><br>'; 
}
?>

but the links do not register the id number (ex: deletenews.php?id= ) thats what the link is it has no number after id....How do I fix that?

#6 Immortal55

Immortal55
  • Members
  • PipPipPip
  • Advanced Member
  • 59 posts

Posted 11 September 2006 - 05:46 AM

anyone?

#7 btherl

btherl
  • Staff Alumni
  • Advanced Member
  • 3,893 posts
  • LocationAustralia

Posted 11 September 2006 - 07:57 AM

stripslashes(extract($row)) doesn't do what you want it to do.  You need to call stripslashes() on the title directly.

But that won't affect $id not being set.  Try adding

print_r($row); print_r($title); print_r($id);

inside your while loop, after you call extract().  Maybe it'll show up something useful.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users