RE: Php if statement in a form (solved)

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

 



Not to worry - manage to solve the problem using the line below

$date=date('H:i');
echo "<input name=\"timeout\" type=\"text\" value=\"$date\">";

Thanks for all the input


-----Original Message-----
From: Baiocchi, Justin (CSIRO IT, Armidale) 
Sent: Friday, 6 August 2004 12:50 PM
To: php-db@xxxxxxxxxxxxx
Subject: RE:  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:hhwee@xxxxxxxxxxx] 
Sent: Friday, 6 August 2004 12:30 PM
To: php-db@xxxxxxxxxxxxx
Subject: Re:  Php if statement in a form


what about this?

if(empty($row["timeout"]))


----- Original Message ----- 
From: "Doug Thompson" <dthompson@xxxxxxxxxxxxx>
To: <Justin.Baiocchi@xxxxxxxx>
Cc: <php-db@xxxxxxxxxxxxx>
Sent: Friday, August 06, 2004 10:18 AM
Subject: Re:  Php if statement in a form


> if (is_null($row["timeout"]).....)
> 
> Justin.Baiocchi@xxxxxxxx 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



[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux