15 lines
392 B
PHP
15 lines
392 B
PHP
<?php
|
|
|
|
$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);
|
|
|
|
?>
|
|
|