Jump to content

Ocean_Voyager

New Members
  • Posts

    7
  • Joined

  • Last visited

Ocean_Voyager's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thank you! I'll do some more work on it.
  2. Hi all, I hope you can help. I am trying to write php code so that a different image is displayed in my site header depending on the date. All year round is one image, but at Christmas a festive version is shown instead. Here is my code; <?php // Normal (6 Jan - 31 Nov) if ((date('m') == 06) && (date('d') >= 01) || (date('m') == 11) && (date('d') <= 31)) { echo "<img src="image/site/site-header.png">; } // Christmas (1 Dec-5 Jan) else if ((date('m') == 12) && (date('d') == 01)) || (date('m') == 01) && (date('d') <= 05)) { echo "<img src="image/site/site-header-christmas.png">; } ?> However, I am getting this error message; Parse error: syntax error, unexpected 'image' (T_STRING), expecting ';' or ',' in /homepages/29/d1007800584/htdocs/page/site-header-test.php on line 4 Sorry, I am very much a beginner so please forgive my ignorance / stupidity - what am I doing wrong here?
  3. Thank you, thank you, thank you all so much! That was it! Phew! I'll ask my host about the outdated php.
  4. Urgh, thank you! But that wasn't it - links still not showing up.
  5. Hi all, I hope you can help as I am going out of my mind trying to work out what I'm doing wrong. Long story short, I want to have my new site's navigation links as an include so that if I need to update them I only do it the once rather than have to go through every page. The list of links shown in pic 'newsitehelp02' should appear at line 30 on 'newsitehelp01'. When I upload all the relevant pages to my host I don't get any php error messages - the navigation links just don't show up at all. What am I doing wrong? Thanks!
×
×
  • 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.