You are here: Two systems->Two results « PHP Programming Language « IT news, forums, messages
Two systems->Two results

Posted by James on 10/12/05 23:35

I'm just beginning my PHP studies and one of the first tutorials gives
different results. The user is prompted for a Name, and PHP is to say
"Welcome <name>!" on another page. On my hosted server the example works
fine, but on my own machine the message "Welcome !" is displayed,
instead of "Welcome James!" (or whatever). The code:

hello-web.htm

<form action="hello-web.php" method="post">
<td>Name:</td>
<td><input type="text" name="frmName" size="24">
<input type="submit" value="Submit">
</form>


hello-web.php

<p>Hello
<?php echo($frmName); ?>!


And from the log:

[client 127.0.0.1] PHP Notice: Undefined variable: frmName in
C:\\wwwroot\\phpdev\\hello-web.php on line 2, referer:
http://localhost/phpdev/hello-web.htm

The host system is using an older version of PHP and Apache, but I would
think the problem is something else. Anyone have an idea? Thanks.

James

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация