dynamically youd have to use javascript
the easied way is ti have a form where you enter the date, have that form post to a script that queries the database, then based on the info fill in the form on the next page. If you know how to query the db and everything the form would just be like
<input type="text" value="<?=row[field] ?>">
Something like this