initializing HTML form using PHP

From: Date: Fri, 30 Apr 2004 21:19:09 +0000
Subject: initializing HTML form using PHP
Groups: php.general 
Request: Send a blank email to php-general+get-185078@lists.php.net to get a copy of this message
I have a large HTML form (~100 form elements) that I used a year ago to conduct a survey. Now I would like to use this same form but rather than starting with an empty form I would like to populate the form with a user's survey response from last year. I have the survey data in a mysql db and I know how to use PHP to retrieve a user's data. However, the only way I know to insert a user's data into a form is to embed value="<?php echo $var; >" statements for each form element (text, checkbox, drop-down, etc). This is pretty messy, especially for drop-down lists. Is there a cleaner, easier way to do this? Denis

« previous php.general (#185078) next »