PHP form post problem (simple)

I am following a PHP tutorial from So far all the code that I tested worked fine.
I am now writing a simple search HTML page that is supposed to pass the parameter named “name” to a PHP page; and the way I am testing to see if the parameter was passed to the PHP page successfully is to have a simple echo $name statement on the PHP page. However I am getting the following error :-\ : Notice: Undefined variable: name in c:\inetpub\wwwroot\php_site\resultsbyname.php on line 2

Here is the code for my search page searchbyname.html:


[TITLE]Vinyl Dealers: search[/TITLE]

[H2]Search for a shop[/H2]
[FORM ACTION="resultsbyname.php" METHOD="POST"]

(i replaced < and > with [ and ] in the above code because if I didn’t the code would have executed)

And here is the resultsbyname.php page that is supposed to display whatever I type inside the input box on the search page:

echo $name;
(i replaced < and > with [ and ] in the above code.)

I have no idea what is wrong! This should be easy. I can’t go on with the tutorial until I fix this problem. All the code above is exactly as it is on the tutorial from
Anyone know why I am having this problem??:q:

It sounds like your trying to test it on your computer. Try testing it by Uploading it to a PHP enabled server. Then going to the proper URL of the page.