I have a table named queries.there is an column named query.

My teacher has asked me to make a form in which first page lists all the queries(with checkmarks) from the database.It has a submit button.

Second page to delete the entries.
Once entry is deleted redirect the second page back to the first.

She says;
"You need to make a PHP file, add a html form to it. Make SQL calls and fill in the data on the form. On press of submit redirect to another page with PUT variables. In another page, retrieve the PUT variables and delete the db entry corresponding to the PUT variables. Once entry is deleted redirect the second page back to the first."

Ive made a php connection file which can retrieve the queries.

"I dont know what to do"

Can someone help.

post the code you have created, nobody will help unless you show evidence of attempt
& its a lot easier to change old code than write new code

Table name queries
column query
I need to make a form in which "Reading data from DB and display is to be done on first page. Second page will have no UI just a query execution which deletes entries selected on page 1.

page 1: read data-> display-> allow users to select entries being displayed -> When user presses delete button at the bottom -> redirect the control to the next page.
page 2: Retrieve the PUT parameters -> execute the delete query and remove all the entries selected -> once deletion is done -> redirect the control to page 1 (page 1 will automatically query the DB and display the remaining entries.
Please help

echo "List of Queries";
$ebits = ini_get('error_reporting');
error_reporting($ebits ^ E_NOTICE);// Turns off all the notices &warnings
mysql_connect("localhost","root","") or die(mysql_error());//Connects to 

the DB

mysql_select_db("testdb") or die(mysql_error()); //Selects one database
echo "<br />";
$query = "select query from queries ";
$result =  mysql_query($query) or die(mysql_error()); //sends a unique query 

to active database on the server 

while($row = mysql_fetch_array($result)) 
echo $row['query'];
echo "<br />";


This is php connection code to display queries. I need to attach it as first page of html form with checkmarks for each query so that user can select it and a delete button. How to do it?