QUOTE(irishgirl @ 28 Aug, 2008 - 07:57 AM)

CODE
$available1=$row2[5];
$avail1=$row2[6];
$available2=$row2[8];
$avail2=$row2[9];
I really suggest developing a standard for how you name your variables. Maybe you can keep in your head what the difference is between these variables, but once you post it or someone else needs to look at it, we have no idea.
Same with item1 items1.. that took me like 5 minutes to spot that you were using different variables.
If you want to skip the current page, you need to have somewhere in your script defined what the current page is (which you either dont or dont show), then you can change the query so its
$result2=mysql("$DBName","SELECT * FROM range WHERE not(FIELD_NAME = $CURRENT_PAGE)");
with the appropriate field name of course for whatever available1 and available 2 are supposed to be