moved database creation into global.php

This commit is contained in:
Václav Šmejkal 2024-05-10 15:45:13 +02:00
parent 90fa9fc9ff
commit 099d6027c5
Signed by: ENGO150
GPG Key ID: 4A57E86482968843
2 changed files with 6 additions and 4 deletions

View File

@ -54,10 +54,7 @@ session_start();
</div> </div>
<?php <?php
//PASSWORD include("./res/global.php");
$secret = fopen("./secret", "r");
$database = mysqli_connect("109.123.243.163", "fht", fgets($secret), "fht");
fclose($secret);
//CHECK FOR LOGIN //CHECK FOR LOGIN
if (isset($_SESSION["username"])) login(null); if (isset($_SESSION["username"])) login(null);

5
res/global.php Normal file
View File

@ -0,0 +1,5 @@
<?php
$secret = fopen("./secret", "r");
$database = mysqli_connect("109.123.243.163", "fht", fgets($secret), "fht");
fclose($secret);