Experts,
This time I have figured out the problem but stuck with the solution.
I have this search page,when I enter Adjacent Technology in the search criteria.It gives me the right result.But when I click next to go to next page it trims Technology and the search criteria searches for only Adjacent(which doesnt exist).
Here is the code:
$MaxDisp = 50; //Set Maximum number of rows to be displayed
//Fill in data table
for ($RowsDisp =1; ($QueryResultRow= mysql_fetch_array($QueryResult)) AND $RowsDisp <= $MaxDisp; $RowsDisp++){
//print_r(mysql_fetch_array($QueryResult));
?>
<TR align="center" valign="top">
<TD align="middle" valign="center">
<?
</TR>
<?
}
?></TABLE>
<?
if(!$skip) $skip=0; //set the value of skip to 0 if unset
print("Total number".$QueryTotalRows);
print "IF Passed ".($skip+$MaxDisp);
if(($skip+$MaxDisp)< $QueryTotalRows){//if end is earlier then next skip value, set the end to # of rows
print("Query Total Rows".$QueryTotalRows);
$PageEnd = $skip+$MaxDisp;
print "page end is".$PageEnd;
}
else {
print "After else the total number of rows are". $QueryTotalRows;
$PageEnd = $skip+$MaxDisp;
print "Page end after else".$PageEnd;
$PageEnd = $QueryTotalRows;
}
print "<p>Displaying records $skip - $PageEnd of $QueryTotalRows<p>";
//SKIP =0 and MAX DISP at this point is 50
if ($skip-$MaxDisp >=0){ //Go back a page
print"Goback a page". $skip-$MaxDisp;
print "<A HREF=EquipmentSearch.php?skip=".($skip-$MaxDisp)."&manufacturer=$manufacturer&process=$process&wafer=$wafer&search=$search>Prev </a>";
print "      ";
}
print "BEFORE if(forward)".$QueryTotalRows;
print"skip+maxdisp".($skip+$MaxDisp);
if ($skip+$MaxDisp <= $QueryTotalRows) { //Go forward a page
print "<A HREF=EquipmentSearch.php?skip=".($skip+$MaxDisp)."&manufacturer=$manufacturer&process=$process&wafer=$wafer&search=$search>Next</a>";
}
?>
Thanks in advance.
Best,
Divya