Yes they need to be in a PHP page, if your server doesn't parse .html for PHP code. Just copy any of the code snippets here that you need, and save them as something.php. Then your name your portal page index.php and inside there just use the include command to call something.php. It should look something like this:
Code:
<html>
<?php
include("something.php");
?>
</html>
Of course with all of your other html code for your main page in there as well.
-Chris