I am trying to change the value of just one field. Below is my code. Please keep it simple...I am new at this.
choose1.php
?>
<form method="post" action="choose2.php">
<input type="hidden" name="id" value="<?echo "$id";?>">
<input type="hidden" name="other_data" value="<?echo "$other_data";?>">
<?
while ($row = mysql_fetch_array($sql_result)) {
$id = $row ["id"];
$selected = $row ["selected"];
echo "
if ($selected == Y) {
echo ("<input type=radio name=selected value=Y checked>");
} else {
echo ("<input type=radio name=selected value=N>");
} echo "
Show this information for identification: $other_data.
I need to change the value of just one field.
";
}
?>
choose2.php
<?
$sql = "UPDATE propertydata SET id = '$id', selected = '$selected', other_data = '$other_data'WHERE id = $id";
$sql_result = mysql_query($sql,$connection)
or die("Couldn't execute query.");
?>
results: Couldn't execute query.