14 lines
503 B
PHP
14 lines
503 B
PHP
|
<?php
|
||
|
$polaczenie = mysqli_connect("172.19.0.3", "root", "secret", "bazqq");
|
||
|
$imie = $_POST['imie'];
|
||
|
$nazwisko = $_POST['nazwisko'];
|
||
|
$email = $_POST['email'];
|
||
|
$photo = $_FILES['photo']['tmp_name'];
|
||
|
$photoContent = null;
|
||
|
if (is_uploaded_file($photo)) {
|
||
|
$photoContent = addslashes(file_get_contents($photo));
|
||
|
}
|
||
|
$kwerenda = "INSERT INTO dane (imie, nazwisko, email, photo) VALUES ('$imie', '$nazwisko', '$email', '$photoContent')";
|
||
|
mysqli_query($polaczenie, $kwerenda);
|
||
|
echo json_encode($response);
|
||
|
?>
|