hey folks
i have a table with these fields in each row...
commentid (autoincrement int key)
commentname (text)
commentmail (text)
commentsite (text)
commentcomment (text)
commentdte (timestamp)
i have this code...
$query = "SELECT commentid, commentname, commentmail, commentsite, commentcomment, commentdte FROM $table_name ORDER BY commentid DESC";
$res = mysql_query($query);
// build the display array
while($row = @mysql_fetch_array($res)) {
$disp_array[$row[commentid]] = $row[commentname];
}
then this to display...
<form>
<?
while(list($id,$comment) = @each($disp_array)) { ?>
<input name="name[<?= $id ?>]" size="30" maxlength="70" value="<?= $comment ?>">
<?}?>
</form>
what this does is create four input textboxes
(there are four entries in the table)
what i want to be able to do is create other textboxes to include all the other info for each row of my table. thing is i cant work out how the arrays are supposed to go
can anyone help?
thanks
give me all your lentils
i have a table with these fields in each row...
commentid (autoincrement int key)
commentname (text)
commentmail (text)
commentsite (text)
commentcomment (text)
commentdte (timestamp)
i have this code...
$query = "SELECT commentid, commentname, commentmail, commentsite, commentcomment, commentdte FROM $table_name ORDER BY commentid DESC";
$res = mysql_query($query);
// build the display array
while($row = @mysql_fetch_array($res)) {
$disp_array[$row[commentid]] = $row[commentname];
}
then this to display...
<form>
<?
while(list($id,$comment) = @each($disp_array)) { ?>
<input name="name[<?= $id ?>]" size="30" maxlength="70" value="<?= $comment ?>">
<?}?>
</form>
what this does is create four input textboxes
(there are four entries in the table)
what i want to be able to do is create other textboxes to include all the other info for each row of my table. thing is i cant work out how the arrays are supposed to go
can anyone help?
thanks
give me all your lentils