infill form fields from mysql data base
Posted: Fri Jun 03, 2011 3:44 pm
hi
i have a form a user initially fills in, submits, and the data safely gets into the database.
but i want to recall the form, re-fill the fields from the database, edit as needed, then resubmit
as far as the form submission that is working fine. the area i am getting stuck with is pulling the record from the DB and placing the data in the form fields
i had been using the code below, but it makes the form page duplicate (!)
and then in the form field for the value
the data dos show up in the field, but the page duplicates itself for some weird reason
i have a form a user initially fills in, submits, and the data safely gets into the database.
but i want to recall the form, re-fill the fields from the database, edit as needed, then resubmit
as far as the form submission that is working fine. the area i am getting stuck with is pulling the record from the DB and placing the data in the form fields
i had been using the code below, but it makes the form page duplicate (!)
Code: Select all
{
$sql = mysql_query("select * from cdata where files_id='$term'");
while ($row = mysql_fetch_array($sql)){
Code: Select all
value="<?php echo $row['cb_ytd_ps'];?>"
the data dos show up in the field, but the page duplicates itself for some weird reason