Refactored “tbl_addfield.php” and “tbl_create.php” by moving duplicated code

Moved duplicated codes in “tbl_addfield.php” and “tbl_create.php” to single a file.
Refactored the code using “Extract method” refactoring technique.