Jump to content

true3000

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

true3000's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Alright, so here's the deal...and yes, I have searched high and low and haven't been able to find the solution I am looking for. I want to create a subdomain such as texas.mydomain.com and when someone visits that site they get redirected to my main domain BUT with a welcome message such as "Hi Texans, welcome to mydomain.com"... Now when someone enters just mydomain.com it would read as something generic like..."Hi there"... Anybody know what the appropriate code would be or at least point me in the right direction? EDIT: I was able to come up with the following but it causes the site to return blank... <? $states = array( "tx" => "Texan", "ak" => "Alaskan" ); // If the "s" (state) parameter isn't set or the state code doesn't exist in the array (user tampered), show generic message if ((!isset($_GET['s'])) || (!array_key_exists($_GET['s'], $states))) { echo "Insert generic welcome message." } else { $key = $_GET['s']; echo "Welcome, " . $states[$key] . "." // Shows "Welcome, Texan." etc. } ?> the subdomain is redirected using: <? // Redirects user to main site, with parameter "s" (state) as "tx" (Texas) header("Location: http://www.mydomain.com/?s=tx"); ?>
  2. would this work: <?php echo date('m/d/Y h:i:s', strtotime('next tuesday')); ?> and when tuesday comes and goes, will it reset to show the next Tuesday?
  3. Alright, I am needing a little help. I need a php date to display ie. 'Saturday May 16th, 2009' that resets every Sunday at 12:01am to the next Saturday. Is there any way this can be done...and how?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.