Answer :

The presence of the gauze, or lack thereof. (Independent Variable)

Also technically the the Dependent Variable, which is whether or not maggots appeared.

He also did a second experiment; the independent variables were the open jar (often called the control nowadays), the jar covered with gauze, and the jar covered with cork.

The dependent variables would be again, the appearance of maggots. They appeared in the uncovered one, appeared on the gauze covered one, but did not survive, and were absent on the cork covered one.