An HTML form works by submitting form elements from one page to another, or to itself. The page that receives the form field values is the page specified as the action of the form.
In most search forms you use method="get" in the form so that the search fields appear in the url. The reason why is that it allows you to send the search results to someone else, which you can't do with a form POST.
If you want to make a submitted value more permanent, you use the SESSION.
In your case, you want to save the value of the number of days to show. You want to use the session so that if the user navigates to the next page in the result-set, the value is maintained.
Since you are saving the value from the submitted form, it has to be on the page specified as the action of that form, because that is the only page the receives the value. So, your results page in this case.
Once you create the session variable it is available to use on any other pages after that page. It is a persistent value. In your case you can use it in your sql_parameter to add the value to your recordset.
So, the value is submitted on the search page and sent to the results page. The results page saves the value into the session so it will be persistent, and then uses the session to set the value in the recordset.
If you want to schedule a premier support ticket, then I could go through all of this with you in a screen sharing session and show you how to do it, but it shouldn't be too difficult to do.
Have you tried? How far do you get? Instead of asking 4 questions, just ask 1 question and concentrate on the step you are stuck on. Then I can answer that one question more thoroughly and help you get through it before moving on to the next.
I don't know your understanding of HTML, PHP, MySQL, or web development in general. I try to answer your questions but it can get confusing when I'm answering multiple questions at once. Take it slow and you can get through it. If you want it done quickly, then I'd suggest premier support.