first commit
This commit is contained in:
commit
d975e212f9
35 changed files with 813 additions and 0 deletions
39
prestito/prestito.php
Normal file
39
prestito/prestito.php
Normal file
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
session_start();
|
||||
|
||||
if (!isset($_POST["prestito"]) or ($_POST["cifra"] == "")) {
|
||||
header("Location: errore.php");
|
||||
exit();
|
||||
}
|
||||
|
||||
$_SESSION["nome"] = $_POST["nome"];
|
||||
$_SESSION["cognome"] = $_POST["cogn"];
|
||||
$_SESSION["prestito"] = $_POST["prestito"];
|
||||
$_SESSION["cifra"] = $_POST["cifra"];
|
||||
|
||||
if ($_POST["prestito"] == 12) {
|
||||
$temp = $_POST["cifra"] * 1.04;
|
||||
} else {
|
||||
$temp = $_POST["cifra"] * 1.004167;
|
||||
}
|
||||
$_SESSION["cifraCalcolata"] = $temp;
|
||||
?>
|
||||
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>Prestito</title>
|
||||
<?php require "includes/head.php" ?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Calcolo saldo del prestito richiesto</h1>
|
||||
<p>Benvenuto <?php echo $_POST["nome"] . " " . $_POST["cogn"]; ?><br>
|
||||
il saldo del tuo prestito di <?php echo $_POST["cifra"] ?> tra xx giorni sarà di:
|
||||
<?= $_SESSION["cifraCalcolata"] ?> €
|
||||
</p>
|
||||
<a class="btn btn-primary" href="conferma.php" role="button">Conferma Prestito</a>
|
||||
<?php require "includes/footer.php" ?>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue