for($i = 0; $i < count($ro); $i++){
What's this good for? You don't take advantage of any for loop variables in your code.
If you are trying to compare the two variables you should use the == operator.
if($year = $coupon1year || $make = $coupon1make || $model = $coupon1model || ($nextincrementmileage >= $coupon1mileage_low && $nextincrementmileage <= $coupon1mileage_high)){
This if/else snippit has no else, meaning if it fails nothing happens, that seems weird.
while ($row17 = mysql_fetch_array($result17)) {
With this while loop all you are doing is overwriting the same variables each time it runs, that can't be intended, the assigned variables will only hold data from the last record in the recordset.
Where are you using the variables?
Try to explain in more detail what you are trying to achieve cause I don't have a clue after looking through this code 🙂
Azala