Works fine, (in HTML)
You need to put that whole section where you want it, eg in a table / inline with some text.
Make sure that it is inbetween the <body>here</body> tags.
in PHP you can add it, i would just close the ?> enter the script then re open <?php