
Originally Posted by
daverad
Thanks David. That is what I am looking for but I don't know what code to include on the page. Would you be able to tell me what that code is or give me some advice where I could find that information?
Regards,
Dave
You may want to use:
PHP Code:
<?php echo $_SERVER["HTTP_HOST"]; ?>
... where you want to display the domain name.
For example, your old HTML code may be:
HTML Code:
<h1>Welcome to MyDomain.com!</h1>
To make the code dynamic so it changes based on what domain the user is visiting, you would rename the file in your skeleton directory from index.html to index.php (so PHP code will be interpreted) and change HTML code (based off the above example) as follows:
HTML Code:
<h1>Welcome to <?php echo $_SERVER["HTTP_HOST"]; ?>!</h1>
For more documentation on PHP variables like this, check out this PHP documentation page:
http://us3.php.net/manual/en/reserve...riables.server