• 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?
Thanks!

<html>
<head>
  <title>Input</title>
</head>

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

<?php
echo "Hello";
?>


</body>
</html>
0
ClaytonGlass
Asked:
ClaytonGlass
1 Solution
 
BenefordCommented:
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.
0
 
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
0
 
ClaytonGlassAuthor Commented:
Thanks! I was going to try that!
0

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