Hi,
Can anyone tell me what I'm doing wrong? The following works fine:
$sql="SELECT topicName, topicDesc FROM topics WHERE topicID=$topicID";
$result=mysql_query($sql);
$query_data=mysql_fetch_row($result);
echo $query_data[0]." ".$query_data[1]
The echo statement produces "Topic 1" and "Topic Desc 1"
I then try to use them to pre-populate a form:
[some HTML]...
<td width="67%"> <input name="new_topicName" type="text" size="50" value=<?php echo $query_data[0]; ?>></td>
</tr>
<tr>
<td valign="top"><div align="right"><font color="#CC3300"><strong>Topic
Description:</strong></font></div></td>
<td><textarea name="new_topicDesc" cols="50" value=<?php echo $query_data[1]; ?>></textarea></td>
</tr>
[some more HTML]...
But only $query_data[0] displays anything. $query_data[1] remains blank. How can this be if I successfully echoed them out earlier?
Out of curiosity, I switched $query_data[0] with $query_data[1] and this time $query_data[0] was empty!
Thanks for any pointers.