These 3 rows could be refactored in a loop where the same queryDB is executed and only table name is changing.
e.g.
foreach(table_name in [name1, name2, ...]) {
    queryDB("DELETE FROM %s%s", array($_POST['step1']['tb_prefix'], table_name))
}