added orai
This commit is contained in:
parent
350f937b4f
commit
57d99bf11b
15
SQL_20250122/config.php
Normal file
15
SQL_20250122/config.php
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$server = "localhost";
|
||||||
|
$user = "root";
|
||||||
|
$pwd = "";
|
||||||
|
$db = "autoberles";
|
||||||
|
|
||||||
|
$conn = new mysqli($server,$user,$pwd,$db);
|
||||||
|
|
||||||
|
if ($conn->connect_errno)
|
||||||
|
{
|
||||||
|
die("Nem sikerült a kapcsolat kiépítése: ".$conn->connect_error);
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
13
SQL_20250122/html.html
Normal file
13
SQL_20250122/html.html
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Document</title>
|
||||||
|
<link rel="stylesheet" href="style.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>SZIA!</h1>
|
||||||
|
<a href="index.php">Ha le akarsz kérdezni akkor kattints!</a>
|
||||||
|
</body>
|
||||||
|
</html>
|
40
SQL_20250122/index.php
Normal file
40
SQL_20250122/index.php
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
<?php
|
||||||
|
require_once('config.php');
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Document</title>
|
||||||
|
<link rel="stylesheet" href="style.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<?php if(!isset($_POST["user"])) {
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form action="" method="POST">
|
||||||
|
<label>felhasználó neve: </label>
|
||||||
|
<input type="text" name="user">
|
||||||
|
<button type="submit">Felhasználó adatainak megjelenítése</button>
|
||||||
|
</form>
|
||||||
|
<?php } else {
|
||||||
|
$sql = "SHOW GRANTS FOR ".$_POST["user"].";";
|
||||||
|
|
||||||
|
$result = $conn->query($sql);
|
||||||
|
|
||||||
|
if ($result) {
|
||||||
|
// Bejárjuk az eredményhalmazt
|
||||||
|
while ($row = $result->fetch_array(MYSQLI_NUM)) {
|
||||||
|
foreach ($row as $grant) {
|
||||||
|
echo $grant . "<br>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
echo "Hiba a lekérdezésben: " . $conn->error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
24
SQL_20250122/style.css
Normal file
24
SQL_20250122/style.css
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
height: 100vh; /* A teljes képernyőmagasság */
|
||||||
|
background: linear-gradient(135deg, #000428, #004e92); /* Sötét gradiens */
|
||||||
|
color: #ffffff; /* Fehér szöveg a sötét háttérhez */
|
||||||
|
font-family: Arial, sans-serif; /* Alapértelmezett betűtípus */
|
||||||
|
text-align: center; /* Szöveg középre igazítása */
|
||||||
|
}
|
||||||
|
|
||||||
|
h1, p {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Opcionális: Ha van egy konténered */
|
||||||
|
.container {
|
||||||
|
padding: 20px;
|
||||||
|
border-radius: 10px;
|
||||||
|
background: rgba(0, 0, 0, 0.5); /* Félátlátszó fekete háttér a kontraszt érdekében */
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user