Hi all,
I would like to know how to assign and get the form value when I using it in a loop. I cannot get all the input that I inserted in 'Desc' part and it is from this site. May I know to get this work when I do a loop? Thanks.
a.php
// this can work
<font size="2">Title:</font><br><input type="text" name="Title[]" size="40" value="<?php echo htmlentities($match[$counter], ENT_QUOTES); ?>">
</tr>
<tr> </tr>
// but this can only get the last input when do multiple post
<tr>
<font size="2">Description:</font>
<script language="JavaScript" type="text/javascript">
<!--
function submitForm() {
updateRTE('Desc');
return true;
}
initRTE("images/", "", "");
writeRichText('Desc', '', 350, 200, true, false);
//-->
</script>
</tr>
b.php
$title= $_POST['Title'][$counter];
$desc= $_POST['Desc'][$counter];
mysql_query("insert into post(title, description)values ('$title[$counter]', '$desc[$counter]')")or die (mysql_error());