我想为每个单独的文本输入添加日期

<html>
<body>
<form name="form" method="post">
<input type="text" name="text_box" size="50"/>
<input type="submit" id="search-submit" value="submit" />

<?php
$date = 

$file=fopen(date("Y-m-d").".txt","a+") or exit("Unable to open file!");

if ($_POST["text_box"] <> "")
{
   fwrite($file,$_POST["text_box"]." 
");
}

fclose($file);
?>

Is there a way i can place a date for whenever there is an input?

Thanks guys in advance

Use this code

$(document).ready(function(){
    $("input:text").val("<?php print date('Y-m-d');?>");
});