# PHP form post problem (simple)

**URL:** <https://forum.kirupa.com/t/php-form-post-problem-simple/790>\
**Category:** programming\
**Created:** [July 30, 2002, 3:02am UTC](https://forum.kirupa.com/t/php-form-post-problem-simple/790 "2002-07-30T03:02:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![slow56kftp](https://avatars.discourse-cdn.com/v4/letter/s/e47c2d/32.png) [@slow56kftp](https://forum.kirupa.com/u/slow56kftp)\
**Post date:** [July 30, 2002, 3:02am UTC](https://forum.kirupa.com/t/php-form-post-problem-simple/790/1 "2002-07-30T03:02:45Z")

</div>

I am following a PHP tutorial from [VTC.com](http://VTC.com). 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:

\*\*

```auto

[HEAD]
[TITLE]Vinyl Dealers: search[/TITLE]
[/HEAD]

[BODY]
[H2]Search for a shop[/H2]
[BR]
[FORM ACTION="resultsbyname.php" METHOD="POST"]
[INPUT NAME="name" TYPE=TEXT]
[BR]
[INPUT TYPE=SUBMIT VALUE="Search"]
[/FORM]
[/BODY]

```

\*\*  
(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 [vtc.com](http://vtc.com)  
Anyone know why I am having this problem??:q:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 5, 2002, 5:43am UTC](https://forum.kirupa.com/t/php-form-post-problem-simple/790/2 "2002-08-05T05:43:28Z")

</div>

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.
