|
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]
|