Show sourcecode
The following files exists in this folder. Click to view.
cart.php
idk.html
incl1.php
index.css
intro.php
ovn_forms1.php
ovn_forms1b.php
ovn_forms2.php
ovn_forms2b.php
ovn_forms3.php
ovn_forms3b.php
ovn_forms4.php
ovn_forms4b.php
ovn_forms5.php
ovn_forms5b.php
ovn_funct1.php
ovn_funct2.php
ovn_funct3.php
ovn_funct4.php
ovn_funct5.php
ovn_funct6.php
ovn_funct7.php
ovn_gr1.php
ovn_gr2.php
ovn_gr3a.php
ovn_gr3b.php
ovn_gr4.php
ovn_gr5.php
ovn_incl1.php
ovn_incl2a.php
ovn_incl2b.php
ovn_incl2c.php
ovn_strings1.php
ovn_strings1b.php
ovn_strings2.php
ovn_strings2b.php
ovn_strings3.php
ovn_strings4.php
ovn_strings4b.php
ovn_strings5.php
ovn_strings5b.php
quiz.php
sidslut.php
sidstart.php
text.php
ovn_strings3.php
42 lines UTF-8 Windows (CRLF)
<?php
error_reporting(-1); // Report all type of errors
ini_set('display_errors', 1); // Display all errors
ini_set('output_buffering', 0); // Do not buffer outputs, write directly
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Textsträngar 1</title>
<style>
.container {
text-align: center;
margin-top: 30px;
}
</style>
</head>
<body class="container">
<form method="post" action="">
<p>skriv gärna in två tal, för att få deras kvot (tal1/tal2)<p>
<input type="text" name="tal1" placeholder="tal 1">
<input type="text" name="tal2" placeholder="tal 2">
<br>
<br>
<input type="submit" value="skicka" name="skicka">
</form>
<?php
if(isset($_POST["skicka"])){
$tal1 = (float) $_POST["tal1"];
$tal2 = (float) $_POST["tal2"];
$quotient = $tal1/$tal2;
echo $_POST["tal1"] . "/" . $_POST["tal2"] . " = " . number_format("$quotient", 2);
}
?>
</body>
</html>