Html Form With Database Table


Generate the standard html form based on the columns of the table of database. It will by default create input type='text' for all columns of the table. You can copy source code and modify it as per your requirement. Check the example below, only 3 line of code generates the complete html form.
You can use it with any one PDO, Mysqli or Mysql.
Function Reference :
          	string getHtmlFormWithDBTable(string $table_name [,string $action_url=""] [,string $method="POST"] [,string $input_css_class="textfield"]) 


Name Type Required Parameter Info Example
table_name string Yes table name which html form needs to be generated table name like emp_info,project_info
action_url string Optional Html form action parameter(default is "", i.e. same page) url where you needs to send form data, default is on same page
method string Optional Html form submission method(GET or POST)(Default value=POST) form submission method GET or POST, default is POST
input_css_class string Optional Css class for all input type text css class to be applied on textbox. Default css class value is 'textfield'.


         $sdb= new SimplifiedDB(); 


This will generate html form with input type text controls for the column name of the table