Hello,
Greetings from a completely new person. I need some help with a page that mixes PHP and JavaScript.
Some admissions are necessary. I know (next to) nothing about PHP and JavaScript. I've been put in the unfortunate position of having to fix a set of pages due to my former techy colleague disappearing.
What's happened is this: a website which my university was running as part of a research project was moved to a new server. This server seems to be set up so that PHP commands must be included within <script language="php"></script> tags rather than <?PHP ?>.
The problem comes with the following page which includes both PHP and JavaScript within the same stretch of code. This causes clashes between the different, nested <script> tags.
Could anyone advise on how to fix this? The code follows this message.
Many thanks,
-- Joe
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<script language="php">
</script>
<HTML>
<HEAD>
<TITLE>Willkommen</TITLE>
<META http-equiv="Content-Script-Type" content="text/javascript">
<SCRIPT TYPE="text/javascript" SRC="Dispatcher.js"></SCRIPT>
<SCRIPT LANGUAGE="VBScript" SRC="Dispatcher.vbs"></SCRIPT>
</HEAD>
<BODY BGCOLOR="#ffffff">
<SCRIPT LANGUAGE="JavaScript">
MM_FlashDispatch(
"loadmgflash.php?gametype=<script language="php"> print(urlencode("Start Game")) </script>&gameMode=<script language="php"> print($gameMode) </script>&playerID=<script language="php"> print($playerID) </script>",
"5.0",
false, // don't require latest rev. of plug-in
"loadmg.php?gametype=<script language="php"> print(urlencode("Start Game")) </script>&gameMode=<script language="php"> print($gameMode) </script>&playerID=<script language="php"> print($playerID) </script>",
!MM_FlashUserDemurred(), // don't install if user said no once
"loadmg.php?gametype=<script language="php"> print(urlencode("Start Game")) </script>&gameMode=<script language="php"> print($gameMode) </script>&playerID=<script language="php" print($playerID) </script>",
"loadmg.php?gametype=<script language="php"> print(urlencode("Start Game")) </script>&gameMode=<script language="php"> print($gameMode) </script>&playerID=<script language="php"> print($playerID) </script>",
false,
true // disable auto-install
);
</SCRIPT>
</BODY>
</HTML>