59 lines
1.2 KiB
PHP
59 lines
1.2 KiB
PHP
|
<?php
|
||
|
session_start();
|
||
|
|
||
|
if(isset($_POST["skull"]) && isset($_POST["langos"]) && isset($_POST["bicikli"])){
|
||
|
if($_POST["skull"] == ""){
|
||
|
$_SESSION["skull"] = 0;
|
||
|
} else {
|
||
|
$_SESSION["skull"] = $_POST["skull"];
|
||
|
}
|
||
|
|
||
|
if($_POST["langos"] == ""){
|
||
|
$_SESSION["langos"] = 0;
|
||
|
|
||
|
} else {
|
||
|
$_SESSION["langos"] = $_POST["langos"];
|
||
|
}
|
||
|
|
||
|
if($_POST["bicikli"] == ""){
|
||
|
$_SESSION["bicikli"] = 0;
|
||
|
} else {
|
||
|
$_SESSION["bicikli"] = $_POST["bicikli"];
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
?>
|
||
|
<!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>
|
||
|
<?php
|
||
|
echo "Fizetendő összeg: ";
|
||
|
echo $_SESSION["skull"] * 5000 + $_SESSION["langos"] * 2500 + $_SESSION["bicikli"] * 50000;
|
||
|
echo " Ft";
|
||
|
?>
|
||
|
<!--
|
||
|
<p>Vásárolt termékek:</p>
|
||
|
-->
|
||
|
<?php
|
||
|
/*
|
||
|
if($_SESSION["skull" != 0]){
|
||
|
echo "Koponya: ".$_SESSION["skull"]."db";
|
||
|
}
|
||
|
*/
|
||
|
?>
|
||
|
<form action="index.php" method="POST">
|
||
|
<input type="hidden" name="logout" value="1">
|
||
|
<button type="submit">
|
||
|
Kijelentkezés
|
||
|
</button>
|
||
|
</form>
|
||
|
</body>
|
||
|
</html>
|