[SOLVED] retrieving value from database
Posted: Thu Mar 17, 2005 2:03 am
i have an edit page here....i want to do is when i click edit, i want the value, for example, the topic of the message will also appear in the textfield...to further explain, i am also confused to what i'm saying..
if the topic of my message is "first repprt".....i want to change the topic to "first report"...so i will click the edit link....in my edit link, instead of a blank textfield, i want the wrong topic(in this case, the "first repprt") to appear inside the textfield, so that i will only edit part of the mistake instead of the whole topic....
so far, here's my code
by the way, this code returns
if the topic of my message is "first repprt".....i want to change the topic to "first report"...so i will click the edit link....in my edit link, instead of a blank textfield, i want the wrong topic(in this case, the "first repprt") to appear inside the textfield, so that i will only edit part of the mistake instead of the whole topic....
so far, here's my code
Code: Select all
<?
$query = "e;SELECT topic FROM posts WHERE postID = '$eid'"e;;
$result = @mysql_query($query);
echo '<tr>
<td width="e;20%"e; align="e;right"e;><b>TOPIC</b></td>
<td width="e;1%"e;><b>:</b></td>
<td width="e;79%"e;><input name="e;topic"e; style="e;width:350px"e; type="e;text"e; value="e;{$rowї0]}"e; size="e;40"e; maxlength="e;40"e;></td>
</tr><br>';
?>to the value of the textfield [/quote]{$row[0]}