So, I have a website for a database which contains biological data (proteins). In this website, there is a text search page,
where the user can specify one or more search terms in order to get data from the database. The user can enter up to 5 search terms in each of the
available text boxes, as shown below in text_search.php
The retrieve_text.php page gets the data submitted by the user and fetches the results. Also, if the user clicks on 1 or more of the
checkboxes next to each record, the respective entries are downloaded as raw format archives.
However, because in some cases there were more than 200 results
I decided to implement pagination... I searched around and asked for help, and managed to get it as far as you see below.
My problem is that, although the state of the selected entries is maintained as the user browses from page to page, this is NOT the
case for the $wclause_sql part, which is actually the "WHERE" clause of the sql query. So I can only see the first page, and not the others...
I used sessions in order to keep track which records are selected by the user, so as when the user finally hits 'Retrieve'
he can get all the desired entries, but I cannot transfer the $wclause and therefore, in all other pages except page 1, the SQL query is empty, thus no
entries are shown.
What am I missing here?