ive got this code for a news admin panel. right now it adds, deletes, and im working on editing. the only problem im having is after it querys for the entry that the user wants to edit, i cant display the news topic title in the textbox.. which is probably an easy fix, i just dont know it.
here is the query where the info is entered in the add news section
$addquery = mysql_query("INSERT INTO news (topic,message,author) VALUES ('".$atopic."','".$amessage."','".$aauthor."')") or die(mysql_error());
here is where it is supposed to be displayed in the textbox
foreach($_POST['eiradio'] as $ekey) {
$equery2 = mysql_query("SELECT * FROM news WHERE id='".$ekey."'");
$numrows = mysql_num_rows($equery2);
if(empty($numrows)) {
echo "error. wrong id. hope this doesnt happen";
}else{
while($editarray2 = mysql_fetch_array($equery2)) {
echo "Topic";
echo "</td><td width='250' bgcolor='#EEEEEE'>";
echo "<input type='text' name='aitopic' size='40' value=".$editarray2[topic];
for example, if the topic from the database is "one two three", it only appears as "one".
anyone know?