How can PHP be used to automatically populate a date input field with the current year?
To automatically populate a date input field with the current year using PHP, you can use the date() function to get the current year and then echo it into the value attribute of the input field.
<input type="date" name="date" value="<?php echo date('Y'); ?>">