php post added
This commit is contained in:
parent
ca363fed78
commit
19265c6358
|
@ -0,0 +1,14 @@
|
||||||
|
<?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);
|
||||||
|
?>
|
Loading…
Reference in New Issue