This commit is contained in:
parent
edff1c9ebd
commit
d7505f59d3
5
fetch.js
5
fetch.js
|
@ -1,4 +1,5 @@
|
||||||
const url = "http://localhost/p20/get.php"
|
//const url = "http://localhost/p20/get.php"
|
||||||
|
const url = "http://qstack.pl:8080/z1/get.php"
|
||||||
let lista
|
let lista
|
||||||
|
|
||||||
fetch(url)
|
fetch(url)
|
||||||
|
@ -23,4 +24,4 @@ function sortujSufiksy(data) {
|
||||||
|
|
||||||
function formatSufiksy(sufiksy) {
|
function formatSufiksy(sufiksy) {
|
||||||
// console.log(sufiksy.map((sufiks, index) => `${index + 1} ${sufiks}`).join('\n'));
|
// console.log(sufiksy.map((sufiks, index) => `${index + 1} ${sufiks}`).join('\n'));
|
||||||
}
|
}
|
||||||
|
|
4
get.php
4
get.php
|
@ -2,7 +2,7 @@
|
||||||
$dbhost = "qstack.pl";
|
$dbhost = "qstack.pl";
|
||||||
$dbuser = "boost";
|
$dbuser = "boost";
|
||||||
$dbpass = "pass";
|
$dbpass = "pass";
|
||||||
$dbname = "osoby";
|
$dbname = "db";
|
||||||
|
|
||||||
$conn = mysqli_connect($dbhost, $dbuser, $dbpass, $dbname);
|
$conn = mysqli_connect($dbhost, $dbuser, $dbpass, $dbname);
|
||||||
$ans = mysqli_query($conn, "SELECT * FROM osoby");
|
$ans = mysqli_query($conn, "SELECT * FROM osoby");
|
||||||
|
@ -14,4 +14,4 @@ while ($row = mysqli_fetch_assoc($ans)) {
|
||||||
}
|
}
|
||||||
echo json_encode($json);
|
echo json_encode($json);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue