post update

This commit is contained in:
mpabi 2024-10-10 15:14:09 +02:00
parent 5c7661e2d6
commit 530d1ae8ec
1 changed files with 1 additions and 2 deletions

View File

@ -2,8 +2,7 @@
$con = mysqli_connect("192.168.80.31", "root", "secret", "db"); $con = mysqli_connect("192.168.80.31", "root", "secret", "db");
$rawData = file_get_contents('php://input'); $data = json_decode(file_get_contents('php://input'), true);
$data = json_decode($rawData, true);
$kw = "INSERT INTO Persons (LastName, FirstName, Email, Subject, Path) VALUES ('{$data['ln']}', '{$data['fn']}', '{$data['email']}', '{$data['subject']}', '{$data['path']}')"; $kw = "INSERT INTO Persons (LastName, FirstName, Email, Subject, Path) VALUES ('{$data['ln']}', '{$data['fn']}', '{$data['email']}', '{$data['subject']}', '{$data['path']}')";
$ans = mysqli_query($con, $kw); $ans = mysqli_query($con, $kw);