-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
51 lines (41 loc) · 1.07 KB
/
index.php
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<!DOCTYPE html>
<html>
<head>
<title>SRMS</title>
<link rel="stylesheet" type="text/css" href="./Lcss.css">
</head>
<body>
<center>
<div>
<h1>Result Management System</h1>
<?php
$servername = "localhost";
$username = "root";
$password = "";
// Create connection
$conn = new mysqli($servername, $username, $password);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
// Create database
$sql = "CREATE DATABASE IF NOT EXISTS hsm";
if ($conn->query($sql) === TRUE) {
echo '<hr style=" background:green; border: 2px solid green;width: 25%;">';
} else {
echo '<hr style=" background:red; border: 2px solid red;width: 25%;">' . $conn->error;
}
$conn->close();
?>
</div>
<br/>
<br/>
<div>
<h3>Select the User Mood</h3><br>
<button onclick="window.location.href='./indexS.php'" value="Student">Student</button>
<button onclick="window.location.href='./indexL.php'" value="Student">Lecture</button>
</div>
<p id="print"></p>
</center>
</body>
</html>