added orai
This commit is contained in:
parent
350f937b4f
commit
0158b59ccb
22
20241205/config.php
Normal file
22
20241205/config.php
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$server = "localhost";
|
||||||
|
$user = "root";
|
||||||
|
$pwd = "";
|
||||||
|
$db = "guest13b";
|
||||||
|
|
||||||
|
$conn = new mysqli($server,$user,$pwd,$db);
|
||||||
|
|
||||||
|
if ($conn->connect_errno)
|
||||||
|
{
|
||||||
|
die("Nem sikerült a kapcsolat kiépítése: ".$conn->connect_error);
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = "SELECT * FROM felh";
|
||||||
|
$result = $conn->query($sql);
|
||||||
|
|
||||||
|
if($result->num_rows){
|
||||||
|
echo "Van rekord";
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
3
20241205/footer.php
Normal file
3
20241205/footer.php
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
<?php $conn->close();?>
|
10
20241205/func.php
Normal file
10
20241205/func.php
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<?php
|
||||||
|
$title = "Cím";
|
||||||
|
|
||||||
|
$_SESSION["nev"] = "Vendég József";
|
||||||
|
$_SESSION["id"] = 9999;
|
||||||
|
$_SESSION["islogin"] = false;
|
||||||
|
|
||||||
|
if(isset($_POST["uzenet"])){
|
||||||
|
echo "Az üzeneted: ".$_POST["uzenet"];
|
||||||
|
}
|
13
20241205/head.php
Normal file
13
20241205/head.php
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>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>
|
||||||
|
<?php
|
||||||
|
echo $title;
|
||||||
|
?>
|
||||||
|
</h1>
|
11
20241205/html.php
Normal file
11
20241205/html.php
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<p>Teszt felület vendég</p>
|
||||||
|
|
||||||
|
<form action="#" method="POST">
|
||||||
|
<label for="name">Név: </label>
|
||||||
|
<input type="text" name="name" required><br>
|
||||||
|
<label for="email">Email: </label>
|
||||||
|
<input type="email" name="email" required><br>
|
||||||
|
<label for="uzenet">Üzenet: </label>
|
||||||
|
<textarea name="uzenet" rows="10" cols="50" required></textarea>
|
||||||
|
<button type="submit">Beküldés</button>
|
||||||
|
</form>
|
7
20241205/index.php
Normal file
7
20241205/index.php
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
<?php
|
||||||
|
session_start();
|
||||||
|
require_once("config.php");
|
||||||
|
require_once("func.php");
|
||||||
|
require_once("head.php");
|
||||||
|
require_once("html.php");
|
||||||
|
require_once("footer.php");
|
Loading…
Reference in New Issue
Block a user