You need to put PHP operators within the HTML/Javascript. So an example would be:
HTML/Javascript:
<select name="selectedDB" size="1" onChange="JavaScript:form.submit();">
...should be:
<select name=\"selectedDB\" size=\"1\" onChange=\"JavaScript:form.submit();\">
...when used within PHP.
Wherever you have " within HTML/Javascript, you replace them with \"
The operator switch \ tells the PHP to read the code as non-PHP code, allowing you to write HTML within PHP. Well, that's my understanding of it anyway (more experienced coders feel free to correct me!), and it works 🙂
HTH
Jonathen