You are here: Re: [PHP] problems with self referential sticky forms « PHP « IT news, forums, messages
Re: [PHP] problems with self referential sticky forms

Posted by "Mark Rees" on 07/20/05 11:41

"eoghan" <php@redry.net> wrote in message
news:24A4AA20-7196-4DDD-BD92-60FB93C6DFE9@redry.net...
> On 20 Jul 2005, at 02:22, Linda H wrote:
>
> > fahreheit is here:
> >
> > <?
> > $fahr = $_GET['fahrenheit'];
> > if (is_null($fahr)){ echo 'fahr is null';}
> > $>
> >
> > The error was on the line: $fahr = $_GET['fahrenheit'];
>
> try:
> <input name="fahrenheit" type="text" value="<?php echo $fahr; ?>" />

Do as previously suggested and check that

$fahr=isset($_GET['fahrenheit'])?$_GET['fahrenheit']:null;

(although since you are dealing with a string here, perhaps an empty string
''might be a better bet than null)
then your test is

if($fahr==''){echo 'fahr is empty');

note the semicolon at the end of each line, and your closing php tag should
be ?>, not $>

 

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

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