textbox how to get currentdate value?

Recommended Answers

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

echo date("Y/m/d");
Jump to Post

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

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

Edit: Already shown in above post of pixelsoul.

tnx

Be a part of the DaniWeb community

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