Some PHP fun

Since shareyourmusic.com and worldbeatplanet.com now point to the same host and share the same installation of Drupal, the stand-alone script “feedback.php” on both hosts is the same. Since it isn’t part of Drupal, it didn’t know about the two different sites.

I just added a test (eregi("worldbeatplanet.com",$_SERVER["HTTP_HOST"])) to set some display variables according to the host name, so it will look completely different (and send the feedback to a different address) depending on which hostname it’s run from.

I’m also using a variation of that same script (which I partially ripped off from PHP-Nuke’s feedback module) for the contact form at this site.