textbox how to get currentdate value?

Recommended Answers

All 3 Replies

It depends what format you want it in but...

echo date("Y/m/d");

Take a look at dete method of PHP http://php.net/manual/en/function.date.php.You can choose any of the date format.Example of it with textbox showing its value is shown below

$date = date("Y/m/d");
echo "<input type='text' value='$date'>";

Edit: Already shown in above post of pixelsoul.


Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.