Page 1 of 1
displaying a oolumn from mysql within dropdown dialogue box
Posted: Fri Mar 28, 2008 1:11 pm
by darkenroyce
finished
Re: displaying a oolumn from mysql within dropdown dialogue box
Posted: Fri Mar 28, 2008 1:21 pm
by hawleyjr
There are ways to run PHP within an HTML file but for now just rename the file to PHP.
In your HTML <select></select> tags print your database fields:
Code: Select all
<select>
<?php
$aData = array('one','two','tree');#REPLACE WITH DATABASE DATA
foreach( $aData as $test ){
echo '<option value="' . $test . '">' . $test . '</option>';
}
?>
</select>
Re: displaying a oolumn from mysql within dropdown dialogue box
Posted: Fri Mar 28, 2008 5:56 pm
by darkenroyce
finished
Re: displaying a oolumn from mysql within dropdown dialogue box
Posted: Sun Mar 30, 2008 7:43 pm
by AMCH
darkenroyce wrote:finished

Rather annoying that you edited this and took out the original question, it would be nice for others to be able to see the problem and the solution too.
