Jump to content

kdewitt

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

kdewitt's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. first off, i should point out that i don't really know much at all about php (or html, java script, you name it), but i've been asked to see if i can solve a problem, so here goes: my company sells books, and we have a website that lists our books by season. we used to have two season, fall and spring, and the website would automatically change to say 'spring books' or 'fall books.' the code that defined that looked, i think, like this: <? include_once ('inc/globals.php'); if (($GLOBAL_MONTH >= 7) && ($GLOBAL_MONTH <= 12)) { $season = 'Fall'; } if (($GLOBAL_MONTH >= 1) && ($GLOBAL_MONTH <= 6)) { $season = 'Spring'; } ?> and, i think, linked to an external file (globals.php) that looks like this: <? list ($GLOBAL_YEAR, $GLOBAL_MONTH, $GLOBAL_DAY) = split("-", date("Y-m-d")); ?> Here is my question: We are switching over to a three season year, Spring, Summer, and Fall. I thought that if I just changed the range to <? include_once ('inc/globals.php'); if (($GLOBAL_MONTH >= 9) && ($GLOBAL_MONTH <= 12)) { $season = 'Fall'; } if (($GLOBAL_MONTH >= 1) && ($GLOBAL_MONTH <= 5)) { $season = 'Spring'; } if (($GLOBAL_MONTH >= 6) && ($GLOBAL_MONTH <= 8)) { $season = 'Summer'; } ?> that that would create the third season. It doesn't work that way. Can you help me out? Thanks, Kate
×
×
  • 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.