I have found detectmobilebrowsers.mobi after having read part of my Mobile Web Design for Dummies book and have generated the function below which I hope (if I'm going about it the right way)
So far I have to very basic html pages with just some plain text in them with my intended desktop version and mobile version in a different folder (I am using the Nokia 2730 for the time being which uses the OperaMini Browser). I have 2 questions:
1) should my pages have the .html or .php extensions?
2) where should those 2 lines go exactly in the code for it to detect my nokia device and re-direct appropriately?
I tried it using the .html extension and my phone displayed the desktop version when I was hoping it would display the mobile version.
When using the .html extension I have found that the PHP function which I had put in the 'head' section of the page was actually being displayed as text at the top of the page when viewing on a desktop computer (the phone just displayed the normal desktop text).
When I changed the desktop version to .php it failed to work on both my phone and a desktop computer.
I appreciate this may be a 'noob problem' but right now I most certainly am a noob when it comes to Mobile Web Design