I have a silly issue,
I am creating a CMS at the moment. it has pages and menus .
I created a page to add new pages. on that page i have a drop down list that is populated with data from the menu.
I also have an edit page, on this page i want to pull in the current value from the database into a drop down and be able to change the value.
Can anyone help
To fetch values from db into a drop down u can use this...
$query = "SELECT fieldname FROM tablename" ;
$result = mysql_query($query);
echo'<select name="somename">';
while($row = mysql_fetch_assoc( $result )) {
echo '<option value="'.$row['fieldname'].'">' . $row['fieldname'] . '</option>';
}
echo '</select>'; I didnt test it but it must be more or less correct...
cheers!