Cell Phones - Freelance - Credit Card Consolidation - Hypnosis - Mobile Phone

PDA

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


VishalVasani
Oct 1st 2007, 12:31 pm
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, 1: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>
")
}