I'm trying to implement some simple questions on my web site. I understand I need PHP to do this so I'm learning PHP. I have created a test page with some simple PHP statements copied directly from a textbook and nothing seems to be happening. The statements are shown below
<p align="left"> </p>
print "hello world";
<p align="left">Help us plan. If you're coming to the Airshow please answer below.</p>.......etc
When I upload and open the page it only shows other stuff from lower down the page and nothing from the PHP, I get the same result when I use Liveview in DW CS4. The page is here www.hollisterairshow.com/test.html
I must be missing something blindingly obvious.....
First off, for a page to work with PHP it has to have a .php extension and not .html
Second, you might like to take a look at this.
Perfect thanks. The PHP extension made everything work. Reading the article you referenced suggests I need to set up the test environment on my PC using XAMPP. If I do all my testing using test pages on the web site do I need to do this? It's a simple site and I'm the only developer.
Thanks again for the rapid and correct response.
If you're only planning on a simple site and you are happy with what you are doing then why not stay as you are?
If you want to experiment with PHP and really try to get to grips with it then, having a testing server is probably better.