Hi, is there a way to test my php code offline say, rather than having to upload the file to a server and visting that webpage?
+1 for Xampp. I do suggest the non installer version and will post more about WHY if you are interested. Once you have Apache, php, and mysql running on your local machine you will wonder how you ever lived without it.
I think this is the best software http://www.mowes.chsoftware.net I used all xammp, lamp et... but above is the best, no install, lightweight
Use premade package which include PHP, SQL,etc to make your computer run like a server. Google for Xampp / WAMP. - ads2help
upload it to a different directory on your webserver called "testMyNewScript" or something. password protect the page. happy developing.
For windows my recommendation is XAMPP. Under Linux you probably have all set up (LAMP). If you want to do complete testing, with domain name, you can set VirtualHost's.
I used XAMPP for a long time, and had a few problems with it--nothing major, just small annoyances with Apache and PHP. Recently I switched to WampServer 2 and I have to say it's a much nicer program, especially if you've never run a server before. More importantly, it allows you to easily switch between versions of Apache, PHP, and mySQL by downloading their ready made add ons. This makes it easier to match your computers software versions to those running on your production server. Others you might want to look into are VertigoServ and Uniform Server. I haven't used either of them, but they each have good reviews. Wikipedia also has a nice table that breaks down the difference between the different WAMP options you have. Some of the solutions haven't been updated in a while, you'd be best to avoid anything that doesn't contain PHP 5 or better.