Results 1 to 3 of 3
Aug 4, 2010, 14:00 #1
- Join Date
- Jun 2003
- 0 Post(s)
- 0 Thread(s)
A seriously frustrating (noobie?) PHP problem
Ok, I've been looking at this for about an hour now and can find no rhyme or reason why this isn't working.
I'm from the UK, and am trying to implement a bit of Geo Targetting into my website. I've created a function that queries a database fine, so that when I output $country from my laptop, the string "GB" is printed on the screen.
Now for some reason, when I put in the following code, the string value changes to "US" despite the fact that I'm still accessing exactly the same page from exactly the same location:
echo('<link rel="stylesheet" href="../style/us.css" type="text/css" media="screen" />');
echo('<link rel="stylesheet" href="../style/default.css" type="text/css" media="screen" />');
I just don't understand it! How can that be possible from a simple if() statement? No where am I changing the value of the $country variable, so why should it change when I input a simple piece of code??
Any help would be seriously appreciated.
Thanks very much.
Aug 4, 2010, 15:09 #2
Aug 4, 2010, 15:11 #3
Rémon - Hosting Advisor
- Join Date
- Aug 2008
- The Netherlands
- 136 Post(s)
- 2 Thread(s)
Minimal Bookmarks Tree
My Google Chrome extension: browsing bookmarks made easy