Input form now querying SQL