On Wed, 2003-06-04 at 12:51, Øystein Håland wrote: > I'm sorry Dan, but it don.t make any difference. Here's almost the complete > code:
The easiest way to fix it is to enclose the $_SERVER['PHP_SELF'] in curly braces when you embed it into a string. See the manual: http://www.php.net/manual/en/language.types.string.php#language.types.string.parsing.complex Hope this helps, Torben > <?php > $target = "se"; > $languagefile = "../recycle/language_" . $target . ".php"; > include("$languagefile"); > > echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\"> > <HTML> > <HEAD> > "; > if (ereg("/math", $_SERVER['PHP_SELF']) == true) { > echo " > some javascript here "; > } > else if (ereg("/prov/", $_SERVER['PHP_SELF']) == true) { > echo " > some more javascript here "; > } > echo " > <SCRIPT LANGUAGE=\"JavaScript\"> > <!--// > function openPrintCloseWindow() { > > myWin=window.open(\"$_SERVER['PHP_SELF']?skrivut=yeah&target=$target\",\"pri > ntout\",\"scrollbars=yes,status=yes,screenX=0,screenY=0,WIDTH=640,height=500 > \"); > } > //--> > </SCRIPT> > </HEAD> > "; > ?> > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php