I am taking a database course, and I have an assignment that I hope someone can point me in the right direction.

Write a PHP program that allows the user to select fields and number of records they want displayed from a database and then displays them in HTML format.

That is all I'm going off of, so I apologize if it's vague. I can connect to a db fine, I am lost as how to get the user to query and then return the results.

thanks.