2024-10-10 12:07:01 +00:00
|
|
|
<?php
|
2024-10-10 13:04:12 +00:00
|
|
|
|
|
|
|
$con = mysqli_connect("192.168.80.31", "root", "secret", "db");
|
|
|
|
|
|
|
|
$rawData = file_get_contents('php://input');
|
|
|
|
$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']}')";
|
|
|
|
$ans = mysqli_query($con, $kw);
|
|
|
|
|
|
|
|
echo json_encode($kw);
|
|
|
|
|
|
|
|
?>
|
|
|
|
|