Is there any way of entering multiple database data into a form's value? I am trying to set it up where it enters text1 and text2, but I am able to label it different.
For example:
$sql = mysql_query("SELECT * FROM articles");
$row = mysql_fetch_array($sql);
<form>
<table>
<tr>
<td>Text 1</td>
<td><input type='text' name='text1' value="<?php echo $row['text']; ?>" /></td>
</tr>
<tr>
<td>Text 2</td>
<td><input type='text' name='text2' value="<?php echo $row['text']; ?>" /></td>
</tr>
</table>
</form>
I know that there needs to be a foreach or while loop in there, but then I would not be able to label everything accordingly (Ex. Text1, Text2, etc...). Any suggestions? Thanks in advance.