Dateien hochladen nach „“
...
This commit is contained in:
16
group_add.php
Normal file
16
group_add.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
require './db_config.php';
|
||||
$post = file_get_contents('php://input');
|
||||
$post = json_decode($post);
|
||||
|
||||
$sql = "INSERT INTO group (groupname,date_started) VALUES ('" . $post->groupname . "','" . $post->date . "')";
|
||||
$result = $mysqli->query($sql);
|
||||
|
||||
$sql = "SELECT * FROM group Order by groupid desc LIMIT 1";
|
||||
$result = $mysqli->query($sql);
|
||||
$data = $result->fetch_assoc();
|
||||
|
||||
echo json_encode($data);
|
||||
?>
|
||||
|
Reference in New Issue
Block a user