try this??

if($row['timeout']=="")
{
    echo "<input name='timeout' type='text' value='".date('H:i')."'>";
    }else{
    print $row["timeout"];
    }

----- Original Message ----- 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 06, 2004 10:50 AM
Subject: RE: [PHP-DB] Php if statement in a form


> 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:[EMAIL PROTECTED] 
> Sent: Friday, 6 August 2004 12:30 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-DB] Php if statement in a form
> 
> 
> what about this?
> 
> if(empty($row["timeout"]))
> 
> 
> ----- Original Message ----- 
> From: "Doug Thompson" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Friday, August 06, 2004 10:18 AM
> Subject: Re: [PHP-DB] Php if statement in a form
> 
> 
> > if (is_null($row["timeout"]).....)
> > 
> > [EMAIL PROTECTED] wrote:
> > > Still no joy. The parse error actually refers to the --  if
> > > ($row["timeout"] IS NULL); --- line.
> > > 
> > >
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

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

Reply via email to