Add swer
This commit is contained in:
parent
86789e6821
commit
6275cb29a5
20
swer
Normal file
20
swer
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
$dbhost="localhost";
|
||||
$dbuser="root";
|
||||
$dbpass="";
|
||||
$dbname="db";
|
||||
|
||||
$con = mysqli_connect($dbhost, $dbuser, $dbpass, $dbname);
|
||||
|
||||
$rawData = file_get_contents('php://input');
|
||||
|
||||
$data = json_decode($rawData, true);
|
||||
|
||||
$kw = "INSERT INTO zamowienia1(nazwa, cena) VALUES ('{$data ['nazwa']}',{$data['cena']});";
|
||||
|
||||
echo json_encode($kw);
|
||||
|
||||
$ans = mysqli_query($con, $kw);
|
||||
|
||||
?>
|
Loading…
Reference in New Issue
Block a user