Description: Dear Sir/Madam,
Good Morning, I am new to PHP & I need some help. I am working on one online Data Entry form in which some fields contains drop-down values and I want to populate those values directly from MySQL tbl. I have total 7-8 fields in same way. & Some reason, it's not giving me correct output. Also, if I try to run this simple piece by itself, it does give me values and when I include in HTML file, it doesn't work for me: the code I'm copying below: When you've time, can you please advise me on this?
Thank you very very much in an advance.
Have a nice day!
//assuming you have established your database connection.
function your_dropdown ()
<select name="dropdown" id="dropdown">
$query = "SELECT some_value1, some_value2 FROM table";
while ($name_row = mysql_fetch_row($result))
$name = $name_row;
$id = $name_row;
//call the function somewhere