• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 333
  • Last Modified:

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";

1 Solution
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.
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
ClaytonGlassAuthor Commented:
Thanks! I was going to try that!

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now