Re: problems with self referential sticky forms

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"eoghan" <php@xxxxxxxxx> wrote in message
news:24A4AA20-7196-4DDD-BD92-60FB93C6DFE9@xxxxxxxxxxxx
> 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 $>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux