diff --git a/ImportFiles.html b/ImportFiles.html
new file mode 100644
index 0000000..fd75d0d
--- /dev/null
+++ b/ImportFiles.html
@@ -0,0 +1,106 @@
+
+
+
+
+
+
+ table name:
+
+
+
+
+
\ No newline at end of file
diff --git a/dynamic_loading.php b/dynamic_loading.php
index 6cab5d5..89a3ef4 100644
--- a/dynamic_loading.php
+++ b/dynamic_loading.php
@@ -19,8 +19,15 @@
if (isset($_POST["upload"])){
$timestamp = (new DateTime())->getTimestamp();
$data = parseData($_POST["upload"]);
- $result = insertToDb($timestamp, $_POST["header"],$data);
- ajaxReturn($result);
+ if(isset($_POST["tableName"])){
+ $result = insertToDb($_POST["tableName"], $_POST["header"],$data);
+ ajaxReturn($result);
+ }
+ else{
+ $result = insertToDb($timestamp, $_POST["header"],$data);
+ ajaxReturn($result);
+ }
+
}
else if (isset($_POST["processData"])){
$serviceUrl = $_POST["processData"];
@@ -853,6 +860,14 @@
// echo $result;
mysqli_query ($link,$result);
}
+
+
+ $sql = "SELECT @n:=0";
+ mysqli_query ($link,$sql);
+
+ $sql = "UPDATE ".$tableName." SET ID = @n := @n + 1";
+ mysqli_query ($link,$sql);
+
return $tableName;
//echo json_encode($tableName);
}