hello everyone,
I'm new to php and mysql.well, i'm trying to get record(s) from a table.
I could'nt display it on my form.could somebody please tell me where i'm going wrong.
$query = "SELECT parenttopic_name,parenttopic_content FROM topic ";
$result = mysql_query($query);
$numrows = mysql_num_rows($result);
while($row = mysql_fetch_array($result)){
$parent_topicname=$row->parenttopic_name;
$parent_topiccontent=$row->parenttopic_content;
// echo " $row[parenttopic_content]"; --->When i remove the comment of this line, it displays the value from the table on the form.
<tr>
<td width="519" height="19"><INPUT
name="parenttopicname" value = "<? echo $parent_topicname; ?>"></td>
</tr>
<tr>
<td width="519" height="117"><INPUT type="text"
name="parenttopiccontent" value = "<? echo $parent_topiccontent; ?>"></td>
</tr>
Thanking you in advance to pointing out my error.