I-R-Fool Posted November 17, 2008 Share Posted November 17, 2008 Ok, so i'm working on an admin cpNow..I have this message editor, created it myself, but its not working 100%Okay, so i filled a select box with sql data, now i need it to fill the input field with $row['comment']but the comment has to be comment at the selected question.heres my sql query $con = mysql_connect("localhost","*****","******");if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("a", $con);$query = " SELECT * FROM a " . "ORDER BY id DESC";$result = mysql_query($query) or die('Error, query failed');echo("<form><select name='select' value='a' size='auto')>");while($row = mysql_fetch_array($result)){$question = $row['question'];$rowid = $row['id'];echo "<option name='a'>".$row['question']."</option>";$comment = $row['comment'];}echo("</select><br />");echo("<br /><input type='text' name='hai' value=".$comment."></input></form>");mysql_close($con); Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.