To answer taydu's question, generally with PHP you have tokens or whatever that represent the server-side data that you want to have become a part of the HTML that is served to the user. How exactly these are placed on a page with the .php extension varies depending upon the package. The most common I've seen is something like this:
PHP Code:
<? $Some_var ?>
or
PHP Code:
<? echo $Some_var ?>
You can tell I'm not real up on PHP. These same tokens can go in a javascript file. For this script, particularly in this section:
Code:
// ssmItems[...]=[name, link, target, colspan, endrow?] - leave 'link' and 'target' blank to make a header
ssmItems[0]=["Menu"] //create header
ssmItems[1]=["<? echo $Some_var ?>", "<? echo $Some_var_link ?>", ""]
ssmItems[2]=["What's New", "http://www.dynamicdrive.com/new.htm",""]
ssmItems[3]=["What's Hot", "http://www.dynamicdrive.com/hot.htm", ""]
ssmItems[4]=["Message Forum", "http://www.codingforums.com", "_new"]
ssmItems[5]=["Submit Script", "http://www.dynamicdrive.com/submitscript.htm", ""]
ssmItems[6]=["Link to Us", "http://www.dynamicdrive.com/link.htm", ""]
ssmItems[7]=["FAQ", "http://www.dynamicdrive.com/faqs.htm", "", 1, "no"] //create two column row
ssmItems[8]=["Email", "http://www.dynamicdrive.com/contact.htm", "",1]
ssmItems[9]=["External Links", "", ""] //create header
ssmItems[10]=["JavaScript Kit", "http://www.javascriptkit.com", ""]
ssmItems[11]=["Freewarejava", "http://www.freewarejava.com", ""]
ssmItems[12]=["Coding Forums", "http://www.codingforums.com", ""]
of ssmItems.js - once you have placed them in there though, for the server to translate them to their value in the database or wherever it is held, the file must be named with the .php extension:
ssmItems.php
and called that way on the page that is using it:
HTML Code:
<script src="ssmItems.php" type="text/javascript"></script>
Bookmarks