asd
This commit is contained in:
parent
6b33de27f0
commit
8f5e76664e
28
20241010/index.php
Normal file
28
20241010/index.php
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Sütik</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<?php
|
||||||
|
if (isset($_POST["kilep"]) && $_POST["kilep"] == "1"){
|
||||||
|
unset($_COOKIE["belepve"]);
|
||||||
|
unset($_COOKIE["name"]);
|
||||||
|
setcookie("belepve", "");
|
||||||
|
setcookie("name", "");
|
||||||
|
echo $_COOKIE["belepve"];
|
||||||
|
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<form action="redirected.php" method="POST">
|
||||||
|
Név:<input type="text" name="name"><br>
|
||||||
|
Jelszó:<input type="password" name="password"> <br>
|
||||||
|
<button type="submit">
|
||||||
|
OK
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
20
20241010/redirected.php
Normal file
20
20241010/redirected.php
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
<?php
|
||||||
|
if (!isset($_COOKIE["belepve"])){
|
||||||
|
if (isset($_POST["name"]) && isset($_POST["password"]) && $_POST["password"] == "alma"){
|
||||||
|
setcookie("belepve", 1);
|
||||||
|
setcookie("name", $_POST["name"]);
|
||||||
|
} else{
|
||||||
|
echo "Nincs kitöltve min den mező";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($_COOKIE["belepve"])){
|
||||||
|
echo $_COOKIE["name"];
|
||||||
|
echo '<form action="index.php" method="POST"><input type="hidden" name="kilep" value="1"><button type="submit">KILÉP</button></form>';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
12
20241010/sosincsvege.js
Normal file
12
20241010/sosincsvege.js
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
let condition = false;
|
||||||
|
|
||||||
|
|
||||||
|
let myPromise = new Promise((resolve, reject) => {
|
||||||
|
if (condition){
|
||||||
|
resolve("JÓÓÓ");
|
||||||
|
}
|
||||||
|
|
||||||
|
reject("szar");
|
||||||
|
});
|
||||||
|
|
||||||
|
myPromise.then((good) => {console.log(good)}).catch((error) =>{console.log(error)});
|
Loading…
Reference in New Issue
Block a user