javascript label inside php code.

From: Date: Thu, 21 Jun 2001 13:15:15 +0000
Subject: javascript label inside php code.
Groups: php.general 
Request: Send a blank email to php-general+get-54730@lists.php.net to get a copy of this message
Warning: Cannot add header information - headers already sent by (output started I understand that one of the reasons for this erro message is if their is a trailing space after a ?>. I have some PHP code which produces javascript rollover code. Above this there are a few includes referencing database and authorization files. Then I there is this peice of code finish of start code <? $page=getenv(SCRIPT_NAME) ; $page = split( "/", $page, 3 ); $page = "." . $page[4]; $page = split( "\.", $page, 2); $page = $page[1]; ?> <script language="JavaScript"> <!-- This script controls the rollovers in the menu area if (document.images) { <? etc etc start of next code It is this break which produces the error code. Is it possible to place the <script language="JavaScript"> into a piece of php code to fix this error? Or is there another method? Thanks in advance. Andrew

« previous php.general (#54730) next »