-
Notifications
You must be signed in to change notification settings - Fork 2
/
dbTEST.txt
36 lines (31 loc) · 834 Bytes
/
dbTEST.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
IGNORE THIS FILE - TEST PROCEDURE BY ARPAN BHATTACHARYA
<?php
$host = "localhost";
$user = "root";
$pass = "";
#$db = "greenleaf";
$con = mysqli_connect($host, $user, $pass);
if(!$con)
{
echo "Connection failed!";
}
else
{
$checkQuery1 = mysqli_query($con, "SHOW DATABASES;");
if(mysqli_num_rows($checkQuery1) > 0)
{
while($row = mysqli_fetch_assoc($checkQuery1))
{
$testDB = $row["Database"];
if($testDB == "greenleaf") #greenleaf found
{
print ("i got it!");
#go back to index code;
}
}
}
else
{
}
}
?>