Skip to content

Commit db0c145

Browse files
AzhamAzham
Azham
authored and
Azham
committed
new changes
1 parent a76f896 commit db0c145

File tree

4 files changed

+5
-40
lines changed

4 files changed

+5
-40
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
/dbinfo.php
22
/rss/db.php
3+
/gmaps/dbinfo.php
4+
/api/dbinfo.php

api/api.php

+2-11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
require 'dbinfo.php';
4+
35
$format = $_GET['f'];
46

57
if (!isset($_GET['c'])) {
@@ -29,17 +31,6 @@
2931

3032
}
3133

32-
$servername = "stocks";
33-
$username = "fet13023117";
34-
$password = "H46LMffy";
35-
$database = "fet13023117";
36-
37-
// Create connection
38-
$conn = new mysqli($servername, $username, $password, $database);
39-
// Check connection
40-
if ($conn->connect_error) {
41-
die("Connection failed: " . $conn->connect_error);
42-
}
4334

4435

4536

api/functions.php

-17
This file was deleted.

gmaps/index.php

+1-12
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,5 @@
11
<?php
2-
$servername="stocks";
3-
$username="fet13023117";
4-
$password="H46LMffy";
5-
$database="fet13023117";
6-
7-
// Create connection
8-
$conn = new mysqli($servername, $username, $password, $database);
9-
// Check connection
10-
if ($conn->connect_error) {
11-
die("Connection failed: " . $conn->connect_error);
12-
}
13-
2+
require 'dbinfo.php';
143

154
$sql = "SELECT * FROM battle";
165
$result = mysqli_query($conn, $sql);

0 commit comments

Comments
 (0)