My page is a search/edit page for an inhouse db conversion, one high level user only. The data is getting cleaned, and uploaded elsewhere so I'm using a GET string with vars for the page numbering, not worried about sql injection just getting a large editing/uploading task done.
I added the GET string with values in the page numbering. There is a search form with filters. The $sql worked on the first page of the search, but not on the
second page. The filtered value was lost for the
$sqlWHERE on the 2nd page, so I added the $sqlWhere values to the GET
string in the page numbering section. I solved it by
setting the values of the vars first to the GET value, and if no GET value,
then take the POST value. It works now to show all the pages of the
current search .http://phpbuilder.com/board/images/smilies/smile.gif
As I say this is for only IT use not for end-users.
The only issue I have now is what to do if the person changes the search on the
current page? For example,
he has seen the values displayed and edited some records, looked at the pages and now wants to do a totally new
search. I have to initialize the current page number to 0 and reset the
the GET values to "" and I don't know where to do it.
I would rather not have a reset button in the search form.
Is there an way to unset the GET?
There is only one required field? However, they could change the
filtered values and keep the same business unit and it is still a different search.
Is the submit button the only way to tell? If they submit the form again?
I don't know how to tell if the user changed the current search?
Do yo check for if the submit is clicked again somehow and the $sql is different? How do you check for a new POST after there is a GET with a different page number other than 0? So how would you compare the previous GET string with the new GET string or check the submit button again?
thanks,
for ( $p=1;$p<=$noPages;$p++ ) {
echo " <a href='$me?page=$p&error_fla1&nRecs=$nRecs&bu=
$bu&zoneid=$zoneid&zonenm=$zonenm&nationalDrugCode=$nationalDrugCode'>
$p</a>\n";