Skip to content

Commit

Permalink
Adjusting,adding config.php
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Jul 31, 2023
1 parent bc22344 commit 913987a
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 39 deletions.
5 changes: 1 addition & 4 deletions SQL/page1.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,7 @@
</div>
<?php

$servername = "localhost";
$username = "root";
$password = "";
$dbname="OSTE";
require '../options/config.php';
// Step 1: Connect to MySQL
$conn = mysqli_connect($servername, $username, $password,$dbname);
if (!$conn) {
Expand Down
6 changes: 1 addition & 5 deletions SQL/page2.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,7 @@
</form>
</div>
<?php

$servername = "localhost";
$username = "root";
$password = "";
$dbname="OSTE";
require '../options/config.php';
// Step 1: Connect to MySQL
$conn = mysqli_connect($servername, $username, $password,$dbname);
if (!$conn) {
Expand Down
6 changes: 1 addition & 5 deletions SQL/page3.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,7 @@
</form>
</div>
<?php

$servername = "localhost";
$username = "root";
$password = "";
$dbname="OSTE";
require '../options/config.php';
// Step 1: Connect to MySQL
$conn = mysqli_connect($servername, $username, $password,$dbname);
if (!$conn) {
Expand Down
6 changes: 1 addition & 5 deletions SQL/page4.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,7 @@
<li><a href="../vulnerabilities.php">Vulnerabilities</a></li>
</ul>
<?php

$servername = "localhost";
$username = "root";
$password = "";
$dbname="OSTE";
require '../options/config.php';
// Step 1: Connect to MySQL
$conn = mysqli_connect($servername, $username, $password,$dbname);
if (!$conn) {
Expand Down
6 changes: 1 addition & 5 deletions SQL/page5.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,7 @@
<li><a href="../vulnerabilities.php">Vulnerabilities</a></li>
</ul>
<?php

$servername = "localhost";
$username = "root";
$password = "";
$dbname="OSTE";
require '../options/config.php';
// Step 1: Connect to MySQL
$conn = mysqli_connect($servername, $username, $password,$dbname);
if (!$conn) {
Expand Down
6 changes: 1 addition & 5 deletions SQL/page6.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,7 @@
<li><a href="../vulnerabilities.php">Vulnerabilities</a></li>
</ul>
<?php

$servername = "localhost";
$username = "root";
$password = "";
$dbname="OSTE";
require '../options/config.php';
// Step 1: Connect to MySQL
$conn = mysqli_connect($servername, $username, $password,$dbname);
if (!$conn) {
Expand Down
7 changes: 4 additions & 3 deletions options/config.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php



$servername = "127.0.0.1";
$username = "root";
$password = "";
$dbname="OSTE";
?>
5 changes: 1 addition & 4 deletions options/create.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
<?php
$servername = "127.0.0.1";
$username = "root";
$password = "";

require 'config.php';
try {
// Step 1: Connect to MySQL
$conn = new PDO("mysql:host=$servername", $username, $password);
Expand Down
4 changes: 1 addition & 3 deletions options/restore.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php
$servername = "127.0.0.1";
$username = "root";
$password = "";
require "config.php";

try {
// Step 1: Connect to MySQL
Expand Down

0 comments on commit 913987a

Please sign in to comment.