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

Posted by James on 10/13/05 04:54

Anthony Dodds wrote:
> register globals issue
>
> in hello-web.php replace $frmName with $_POST['frmName']
>
> Regards And good luck
>
> Anthony
> "James" <jmessick@triad.rr.com> wrote in message
> news:0se3f.1248$Sg2.199921@twister.southeast.rr.com...
>
>>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
>
>
>

Simply amazing! So I guess it was the difference between PHP 5.0.4 on my
local dev system and PHP 4.3.3 on my host. Thanks for the help!

So where's a good PHP tutorial? I mainly want to write a system to
interact with a MySQL database and produce some web pages with the
contents of same.

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

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