Skip to content

Commit 913987a

Browse files
author
root
committed
Adjusting,adding config.php
1 parent bc22344 commit 913987a

File tree

9 files changed

+12
-39
lines changed

9 files changed

+12
-39
lines changed

SQL/page1.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,7 @@
199199
</div>
200200
<?php
201201

202-
$servername = "localhost";
203-
$username = "root";
204-
$password = "";
205-
$dbname="OSTE";
202+
require '../options/config.php';
206203
// Step 1: Connect to MySQL
207204
$conn = mysqli_connect($servername, $username, $password,$dbname);
208205
if (!$conn) {

SQL/page2.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -196,11 +196,7 @@
196196
</form>
197197
</div>
198198
<?php
199-
200-
$servername = "localhost";
201-
$username = "root";
202-
$password = "";
203-
$dbname="OSTE";
199+
require '../options/config.php';
204200
// Step 1: Connect to MySQL
205201
$conn = mysqli_connect($servername, $username, $password,$dbname);
206202
if (!$conn) {

SQL/page3.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -196,11 +196,7 @@
196196
</form>
197197
</div>
198198
<?php
199-
200-
$servername = "localhost";
201-
$username = "root";
202-
$password = "";
203-
$dbname="OSTE";
199+
require '../options/config.php';
204200
// Step 1: Connect to MySQL
205201
$conn = mysqli_connect($servername, $username, $password,$dbname);
206202
if (!$conn) {

SQL/page4.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,7 @@
182182
<li><a href="../vulnerabilities.php">Vulnerabilities</a></li>
183183
</ul>
184184
<?php
185-
186-
$servername = "localhost";
187-
$username = "root";
188-
$password = "";
189-
$dbname="OSTE";
185+
require '../options/config.php';
190186
// Step 1: Connect to MySQL
191187
$conn = mysqli_connect($servername, $username, $password,$dbname);
192188
if (!$conn) {

SQL/page5.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,7 @@
182182
<li><a href="../vulnerabilities.php">Vulnerabilities</a></li>
183183
</ul>
184184
<?php
185-
186-
$servername = "localhost";
187-
$username = "root";
188-
$password = "";
189-
$dbname="OSTE";
185+
require '../options/config.php';
190186
// Step 1: Connect to MySQL
191187
$conn = mysqli_connect($servername, $username, $password,$dbname);
192188
if (!$conn) {

SQL/page6.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,7 @@
182182
<li><a href="../vulnerabilities.php">Vulnerabilities</a></li>
183183
</ul>
184184
<?php
185-
186-
$servername = "localhost";
187-
$username = "root";
188-
$password = "";
189-
$dbname="OSTE";
185+
require '../options/config.php';
190186
// Step 1: Connect to MySQL
191187
$conn = mysqli_connect($servername, $username, $password,$dbname);
192188
if (!$conn) {

options/config.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?php
2-
3-
4-
2+
$servername = "127.0.0.1";
3+
$username = "root";
4+
$password = "";
5+
$dbname="OSTE";
56
?>

options/create.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
<?php
2-
$servername = "127.0.0.1";
3-
$username = "root";
4-
$password = "";
5-
2+
require 'config.php';
63
try {
74
// Step 1: Connect to MySQL
85
$conn = new PDO("mysql:host=$servername", $username, $password);

options/restore.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<?php
2-
$servername = "127.0.0.1";
3-
$username = "root";
4-
$password = "";
2+
require "config.php";
53

64
try {
75
// Step 1: Connect to MySQL

0 commit comments

Comments
 (0)