Shopping news - Bollywood India forum movie reviews - Find jobs - ROKR E6 - Debt Consolidation

PDA

View Full Version : How to create dynamic Form using php & Mysql ??


VishalVasani
Oct 1st 2007, 11:31 am
Hello,

Any one has any idea how to generate a form using mysql & Php. All the fields in the form are dynamic depending on mysql database table entry....

Please advice on this....

PoemofQuotes
Oct 1st 2007, 12:09 pm
Just fetch the MySQL stuff, then place it within the form using php:


$s1 = mysql_query("SELECT * FROM `banana`");
while ($pie = mysql_fetch_array($s1)) {
print("<form>
<input type=\"text\" name=\"pie_crust\" value=\"$pie['crust']\" />
<input type=\"text\" name=\"pie_flavor\" value=\"$pie['flavor']\" />
</form>
")
}