First off, lets break down your code, and point out some possible mistakes:
$query = "SELECT clypeus FROM clypeus";
$results = mysql_query($query);
Try using:
$query = "select * FROM clypeus ORDER BY varname";
I am unsure why (in the posted code) you are selecting anything, as you are not doing anything with it.. are you trying to compare to data that is already stored in the database?
foreach($row as $value) {
if ($_POST['$value']) {
$value=$_POST['$value'];
$query = "INSERT INTO results VALUES ('" . $_POST['$value'] . "')";
$results = mysql_query($query);
}
Try this:
$value = $_REQUEST['value'] // or $_POST['value'] doesn't matter.
// You don't use $ when getting post data.
while ($row = mysql_fetch_object) {
echo $row->column_name; // Where column_name is the name of the column in
// your SQL table.
}
Once you put the POST DATA to a variable (with $_POST) you can continue to read it from that variable as many times as you like, and you don't have to re-do the POST data.
What would you like to do? Take the information submitted from a form and save it in the database? Then be able to back and delete it?
Mike