asherinho Posted July 4, 2008 Share Posted July 4, 2008 I have a form with a text field which has to take current date,I dont want a user to enter the date because of date format issue so I want php to display current date as a value in the field.How can I go about? Link to comment https://forums.phpfreaks.com/topic/113222-date/ Share on other sites More sharing options...
papaface Posted July 4, 2008 Share Posted July 4, 2008 <input type="text" value="<?php echo date("j/n/Y"); ?>" disabled="disabled" /> Link to comment https://forums.phpfreaks.com/topic/113222-date/#findComment-581671 Share on other sites More sharing options...
SharkBait Posted July 4, 2008 Share Posted July 4, 2008 you could also use readonly="readonly" which would allow them to highlight if needed Link to comment https://forums.phpfreaks.com/topic/113222-date/#findComment-581720 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.