INF.03-01-21.06-SG/swer
2025-03-06 13:26:37 +00:00

21 lines
368 B
Plaintext

<?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);
?>