The search page doesn't need any code. It just needs to submit to the results page. If the form uses method="get" it should automatically add any form fields and their values to the URL. So I'm not sure how you are getting to the results page without the url parameter, but it would imply an issue with the search page form.
Do you have it on a live server where I could view the page for testing and see if I could spot the problem?