suma237 Posted July 17, 2007 Share Posted July 17, 2007 i want to display current date if the value is empty. <input type="text" name="I_CreatedOn" class='textbox' readonly value='if(empty($row[i_CreatedOn]))? echo $date_now;:echo $row[i_CreatedOn];'> Thanks Quote Link to comment Share on other sites More sharing options...
jitesh Posted July 17, 2007 Share Posted July 17, 2007 <input type="text" name="I_CreatedOn" class='textbox' readonly value="<?php echo (empty($row[i_CreatedOn]))?$date_now:$row[i_CreatedOn];?>"> Quote Link to comment Share on other sites More sharing options...
tapos Posted July 17, 2007 Share Posted July 17, 2007 You will have use <?php?> tag. also u can not use ?: for if statement value='if(empty($row[i_CreatedOn]))? echo $date_now;:echo $row[i_CreatedOn];' this shall/will be value='<?=empty($row[i_CreatedOn])?$date_now:$row[i_CreatedOn]?>' -- Tapos Pal Quote Link to comment Share on other sites More sharing options...
suma237 Posted July 17, 2007 Author Share Posted July 17, 2007 thanks everybody..i solved this Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.