I am trying PHP for the first time, so be kind. I have just spent several hours browsing various tutorials and this forum, and can’t find how to actually get my PHP script to run. I checked my site’s host server, and it does support PHP.
The example I’m using (from a manual) says to put this in my webpage:
<?php include (“sidemenu.html”); ?>
and it is supposed to copy sidemenu.html into the webpage. It doesn’t work. I also tried renaming the file sidemenu.shtml (suggested in one of the forums) and using <?php include (“sidemenu.html”); ?> This doesn’t work either.
I then tried placing the code in a file named sidemenu.php and adding this to the webpage:
<script type=”text/php” language=”php” src=”sidemenu.php”></script>
Still doesn’t work.
I think my problem is the PHP script is never invoked. I’m guessing I need to do something similar to what I do to get my JavaScript routines to run, but I can’t figure out the syntax to use with PHP. All my JavaScript routines run onClick, I want the PHP to run when the page is built (no user action required).
<input type=”submit” value=” Submit ” name=submit onClick=”ValidateSOForm(this.form); return ValidReturn;”>
Can anyone help me?