echo lines in php not reading

Please excuse me but I think I am going mad here.
I am trying to get a php drop down list on a web page and the internet has many options I can use.
However, every single one fails as soon as a line starts 'echo'
So I have written a tiny simple example of the echo line.
This code should (amongst other things) display the word "Hello", but does not.
I am using dreamweaver 4 (OK, it is old) but I am baffled at this pretty elementary problem.
Can anybody see the problem?


<body background="">
<form method="post" action="ccsalessum.php" target="Schedule" >
<input type = "text" name="cccust">
  <input type="submit" value="Customer">

echo "Hello";

Richard TeasdaleFinancial ControllerAsked:
Who is Participating?
Julian HansenCommented:
Two things

1. Does your server have PHP installed (have to ask)
2. Does your file have a .php extension - if .html change to .php and try again
I tried your code on my server and Hello appears under the Customer input field - just as you would expect.
That implies it's not a syntax problem but rather a server problem.

Have you tried viewing the source code of the resulting webpage and seeing if that gives any clues.
Richard TeasdaleFinancial ControllerAuthor Commented:
Thanks! I was going to try that!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.