How to insert textfield in the table and submit button under the table
implements hook_form in your module and fetch any data you want from database as well as add textfield.
After completion of all form items you can theme it as using 

$output = theme('table', array( 'header' =&gt; $header,  'rows' =&gt; $rows));


in your page callback function.
for more information you can check form api in drupal.org.