RE: [PHP-DB] Php if statement in a form
| From: | Justin dot Baiocchi at csiro dot au | Date: | Fri, 06 Aug 2004 02:50:12 +0000 |
| Subject: | RE: [PHP-DB] Php if statement in a form | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-35613@lists.php.net to get a copy of this message | ||
Well, this works: so you were all on the right track
if($row['timeout']=="")
{
print "<input name='timeout' type='text' value='"echo
date('H:i')"'>";
}else{
print $row["timeout"];
}
But now I get a parse error on the <input> line
-----Original Message-----
From: Ng Hwee Hwee [mailto:hhwee@towa.com.sg]
Sent: Friday, 6 August 2004 12:30 PM
To: php-db@lists.php.net
Subject: Re: [PHP-DB] Php if statement in a form
what about this?
if(empty($row["timeout"]))
----- Original Message -----
From: "Doug Thompson" <dthompson@brickbarn.com>
To: <Justin.Baiocchi@csiro.au>
Cc: <php-db@lists.php.net>
Sent: Friday, August 06, 2004 10:18 AM
Subject: Re: [PHP-DB] Php if statement in a form
> if (is_null($row["timeout"]).....)
>
> Justin.Baiocchi@csiro.au wrote:
> > Still no joy. The parse error actually refers to the -- if
> > ($row["timeout"] IS NULL); --- line.
> >
> >