Help with assignment 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. you have to create html form and then pass the data
from the to your query, It will look similar to this: <form
action="" method="POST"> Choose a field: Number of records:
<input type="text" name="number" /> <input type="submit"
name="ok" value="show" /> It is not checking the any error or
something, if you want more functional script write to PM.
$query=mysql_query("SELECT ".$field." FROM `yourDB` limit
0,".$num." ");