I am at that stage of creating a web-site where I need to figure out how to have a user input 2 dates at any page and upon pressing "Find" go the the booking page where name, email etc. will be asked for. However, instead of filling out the dates again, I need them to be fillied out from the dates chosen on the previous page, that is to parse the form's inputs from page one to page two. Now, I have read that it could be done with JavaScript using cookies and by using PHP.
My question is: what is considered a better practice and why? And if there are other good ways, what are they and why are they considered good?
From what I understand, JavaScript is heavier to process, but is a good solution if php is not available to the web-site developer. Also, JavaScript is subject to being enabled on one's computer.
PHP, on the other hand is a more orthodox way, yet requires a database, so that with each submission, more and more entries in the database would apper, so more memory requires to host it.
Please correct me if I am wrong, especially about the PHP method.