Add exams from exam156 to exam199

This commit is contained in:
2024-05-16 10:51:54 +02:00
parent 19bf1b8ac8
commit 959a167e9d
29 changed files with 635 additions and 0 deletions

28
exam199/index.php Normal file
View File

@@ -0,0 +1,28 @@
<?php
class DatabaseConnect{
public function __construct($db_host, $db_user, $db_pass)
{
echo 'Attempting connection...';
if(!$this->Connect($db_host,$db_user,$db_pass)){
echo 'Connection failed';
} else {
echo 'Connected to '. $db_host;
}
}
public function Connect($db_host, $db_user, $db_pass){
if(!mysqli_connect($db_host,$db_user,$db_pass)){
return false;
} else {
return true ;
}
}
}
$conn = new DatabaseConnect('localhost','example_user','Kolosnjaj4321!');
?>