Database update script
I think you must change your die/echo mechanism to something another. Like a throw exception or return a status from the function.

if ( ! $stmt-&gt;execute() ) {
  echo "Execute failed: (" . $stmt-&gt;errno . ") " . $stmt-&gt;error;
}


And in this part you must not echo error, but return/throw it. Because if you just print it, your code will work further.

Also you must rewrite updateDataIntoTable like this:

function updateDataIntoTable($mysqli, $tableName, $databaseName, $array ,$idFeildName , $idFeildValue) {
  $dataArrayCount = count($array);
  if ( 0 == $dataArrayCount ) {
      return;
  }
  ...
}


This is called guard statement. Better to keep all returns at top or bottom function.