Hello,
Could this --using dynamic variables to fill up a form-- have security issues ? This is an update form. A user logins to his account and gets back his data in "<form>", where he can update it.
I am checking all the data before it goes back to the BD.
<?php
$qry = "SELECT name, lastname [, ..., ...] FROM table WHERE id = 'someid' ";
$res = mysql_query($qry);
while ($row = mysql_fetch_assoc($res)):
$records[] = $row
endwhile;
foreach ($records as $record):
foreach($record as $key => $value)
$thisvar = $key;
$$thisvar = $value;
endforeach;
endforeach;
?>
<form>
<input name="name" value="<?php echo $name ?>">
<input name="lastname" value="<?php echo $lastname?>">
[...]
</form>
Tnx.