diff --git a/formulare/get_fields.php b/formulare/get_fields.php new file mode 100755 index 0000000..0e53963 --- /dev/null +++ b/formulare/get_fields.php @@ -0,0 +1,29 @@ +$row["id"], + "formular"=>$row["formular"], + "name"=>$row["name"], + "displayname"=>$row["displayname"], + "value"=>$row["value"], + "displayvalue"=>$row["displayvalue"], + "placeholder"=>$row["placeholder"], + "type"=>$row["type"], + "title"=>$row["title"], + "required"=>$row["required"], + "maxlength"=>$row["maxlength"], + "min"=>$row["min"], + "max"=>$row["max"], + "checked"=>$row["checked"], + ]; +} + +echo json_encode($data,JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES); diff --git a/formulare/get_formulare.php b/formulare/get_formulare.php new file mode 100755 index 0000000..2b2b0a6 --- /dev/null +++ b/formulare/get_formulare.php @@ -0,0 +1,17 @@ +$row["id"], + "name"=>$row["name"], + "minitext"=>$row["minitext"], + "public"=>$row["public"], + "multiple"=>$row["multiple"], + ]; +} + +echo json_encode($data,JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES); diff --git a/formulare/get_results.php b/formulare/get_results.php new file mode 100755 index 0000000..2289b9b --- /dev/null +++ b/formulare/get_results.php @@ -0,0 +1,32 @@ +$row["id"], + "name"=>$row["name"], + "value"=>$row["value"], + "type"=>$type + ]; + + } + $data[]=$ergebnis; +} +echo json_encode($data,JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES); + diff --git a/formulare/submit.php b/formulare/submit.php new file mode 100755 index 0000000..91c571c --- /dev/null +++ b/formulare/submit.php @@ -0,0 +1,20 @@ + $value){ + if($key=="internalformid") continue; + if(is_array($value)){ + $value=json_encode($value,JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES); + $key.="[]"; + } + mysqli_execute_query($db_id,"INSERT INTO `formulare-ergebnis` (`name`, `value`,`ergebnisid`) VALUES (?,?,?);",[$key,$value,$id]); + +} diff --git a/hits.txt b/hits.txt index e440e5c..7813681 100755 --- a/hits.txt +++ b/hits.txt @@ -1 +1 @@ -3 \ No newline at end of file +5 \ No newline at end of file