Trying to important database information into form fields, and then also update fields in this form. I can get the information from the database into the form fields, but updating information in the form fields doesn't yeild changes in modification and doesn't change or update the database with the new form field values that I enter manually.
<?
$query = mysql_query("Select * from $table where id='$id' order by date");
while(list($id, $date, $username, $title, $dreamstatus, $entry, $awareness, $pagination) = mysql_fetch_row($query)){
?>
</div>
<div align="center">
<center>
<table width="95%" border="0" cellpadding="3" cellspacing="1" class="table_border">
<tr>
<form method="POST" action="<? echo"home.php?page=manage&action=modify&entry=$id";?>">
<input type="hidden" name="modthis" value="1"><td colspan="2" class="header_cell"> <p align="center">Modify an Existing
Journal Entry</p></td>
</tr>
<tr>
<td width="23%" align="right" class="cells">Date:</td>
<td width="77%" class="cells"><input class="box" type="text" name="date" size="30" value="<?=$date;?>"></td>
<? $username = $_SESSION['username'];?>
<input name="username" type="hidden" value="<? echo $username ?>">
</tr>
<tr>
<td align="right" class="cells">Dream Title:</td>
<td class="cells"><input class="box" type="text" name="title" size="30" value="<?=$title;?>"></td>
</tr>
<tr>
<td align="right" class="cells">Recent or Past Dream?</td>
<td class="cells">Recent
<? if ($dreamstatus == recent) {
print "<input name=\"dreamstatus\" type=\"radio\" value=\"Past\" checked>
Past
<input type=\"radio\" name=\"dreamstatus\" value=\"Recent\">";
}
else {
print "<input name=\"dreamstatus\" type=\"radio\" value=\"Past\">
Past
<input type=\"radio\" name=\"dreamstatus\" value=\"Recent\" checked>";
}
?>
</td>
</tr>
<tr>
<td align="right" valign="top" class="cells">Dream Entry</td>
<td class="cells"><textarea name="entry" cols="80" rows="15" wrap="PHYSICAL" class="input"><? echo $entry; ?></textarea>
</textarea></td>
</tr>
<tr>
<td align="right" valign="top" class="cells">Level of Awareness:</td>
<td class="cells"><select name="select" id="select">
<option selected>Select Level</option>
<option value="Low">Low</option>
<option value="Medium">Medium</option>
<option value="High">High</option>
</select></td>
</tr>
<tr>
<td align="right" valign="top" class="cells"> </td>
<td class="cells"><input name="submit" type="submit" class="tablecell2" id="submit" value="Modify My Dream"></td>
</tr>
<tr>
<td colspan="2" class="header_cell"> <p align="center"> </td></form>
</tr>
</table>
</center>
</div>
<?
}
}
if($modthis == "1"){
$news1 = nl2br($news1);
$newsfull1 = nl2br($newsfull1);
$query = "update $table set date='$date', username='$username', title='$title', dreamstatus='$dreamstatus', entry='$entry', awareness='$awareness', pagination='$pagination' where id=$id";
mysql_query($query,$db);
echo"<center>Post with article $id has been modified!$b</center>";
}