http://www.perlmonks.org?node_id=1092487


in reply to How to get input text boxes populated

Select the data into a hash with the field names as keys. Note the use of a place holder in the query and a hidden field for the selected EmployeeID

my $sql = 'SELECT * FROM "Employees" WHERE "EmployeeID" = ?'; my $hr = $dbh->selectrow_hashref($sql,undef,$input{empid}); print qq! <form action="" method="post"> Employee ID : $hr->{'EmployeeID'}<br/> <input type="hidden" name="EmployeeID" value="$hr->{'EmployeeID'}"/> Last Name :<input name="lastname" value="$hr->{'LastName'}"/><br/> First Name :<input name="firstname" value="$hr->{'FirstName'}"/><br/> <input type="submit" name="go" value="FETCH"/> </form>!;
poj