Compare commits
No commits in common. "b703505447c3f4dc2e2f5380439904ab7c6a3814" and "3ae95bfcd9091c465d58471850e22467fc66d9ee" have entirely different histories.
b703505447
...
3ae95bfcd9
@ -1,16 +0,0 @@
|
|||||||
<!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>Valutan i kronor</h1>
|
|
||||||
<?php
|
|
||||||
$dollar = $_POST['currency'];
|
|
||||||
$sek = $dollar * 11;
|
|
||||||
echo "<p>$dollar $ = $sek kr</p>";
|
|
||||||
?>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,18 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<title>M1-test</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<form action="./handle.php" method="post">
|
|
||||||
<fieldset>
|
|
||||||
<legend>Currency</legend>
|
|
||||||
<label>Amount in $</label><br>
|
|
||||||
<input type="text" name="currency">
|
|
||||||
<input type="submit" value="Convert to SEK">
|
|
||||||
</fieldset>
|
|
||||||
</form>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,17 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<title>Years to pensoin</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>Years to pensoin</h1>
|
|
||||||
<?php
|
|
||||||
$name = $_POST['name'];
|
|
||||||
$age = $_POST['age'];
|
|
||||||
$to_pension = 65 - $age;
|
|
||||||
echo "<p>$name has $to_pension years to pension";
|
|
||||||
?>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,22 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<title>M1-test</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<form action="./handle.php" method="post">
|
|
||||||
<fieldset>
|
|
||||||
<legend>Person</legend>
|
|
||||||
<label>Name</label>
|
|
||||||
<input type="text" name="name">
|
|
||||||
<br>
|
|
||||||
<label>Age</label>
|
|
||||||
<input type="text" name="age">
|
|
||||||
<br>
|
|
||||||
<input type="submit" value="Submit">
|
|
||||||
</fieldset>
|
|
||||||
</form>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,16 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<title>Calculation Result</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<?php
|
|
||||||
$n1 = $_POST['n1'];
|
|
||||||
$n2 = $_POST['n2'];
|
|
||||||
$sum = $n1 + $n2;
|
|
||||||
echo "<p>$n1 + $n2 = $sum</p>"
|
|
||||||
?>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,17 +0,0 @@
|
|||||||
<!doctype html>
|
|
||||||
<html>
|
|
||||||
<head lang="sv"></head>
|
|
||||||
<body>
|
|
||||||
<h1>Matematik-test</h1>
|
|
||||||
|
|
||||||
<form action="calculate.php" method="post">
|
|
||||||
<fieldset>
|
|
||||||
<legend>Calculator</legend>
|
|
||||||
<input type="number" name="n1"> +
|
|
||||||
<input type="number" name="n2">
|
|
||||||
<br>
|
|
||||||
<input type="submit" value="Calculate">
|
|
||||||
</fieldset>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
</body>
|
|
@ -1,15 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<title>Result</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<?php
|
|
||||||
$name = $_GET['name'];
|
|
||||||
$age = $_GET['age'];
|
|
||||||
echo "<p>Name - $name; Age - $age</p>"
|
|
||||||
?>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,19 +0,0 @@
|
|||||||
<!doctype html>
|
|
||||||
<html>
|
|
||||||
<head lang="sv"></head>
|
|
||||||
<body>
|
|
||||||
<h1>Send data via url</h1>
|
|
||||||
|
|
||||||
<form action="handle.php" method="get">
|
|
||||||
<fieldset>
|
|
||||||
<legend>Person</legend>
|
|
||||||
<label>Name</label>
|
|
||||||
<input type="text" name="name">
|
|
||||||
<label>Age</label>
|
|
||||||
<input type="number" name="age">
|
|
||||||
<br>
|
|
||||||
<input type="submit" value="Submit">
|
|
||||||
</fieldset>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
</body>
|
|
@ -1,36 +0,0 @@
|
|||||||
<!doctype html>
|
|
||||||
<html>
|
|
||||||
<head lang="sv"></head>
|
|
||||||
<body>
|
|
||||||
<h1>Send data via url</h1>
|
|
||||||
|
|
||||||
<form action="result.php" method="post">
|
|
||||||
<fieldset>
|
|
||||||
<legend>Quizz</legend>
|
|
||||||
<label>What is the first letter of Alphabet?</label> <br>
|
|
||||||
<input type="radio" name="q1" value="A">A <br>
|
|
||||||
<input type="radio" name="q1" value="B">B <br>
|
|
||||||
<input type="radio" name="q1" value="C">C <br>
|
|
||||||
<input type="radio" name="q1" value="D">D <br> <br>
|
|
||||||
|
|
||||||
<label>What is the second letter of Alphabet?</label> <br>
|
|
||||||
<input type="radio" name="q2" value="A">A <br>
|
|
||||||
<input type="radio" name="q2" value="B">B <br>
|
|
||||||
<input type="radio" name="q2" value="C">C <br>
|
|
||||||
<input type="radio" name="q2" value="D">D <br> <br>
|
|
||||||
|
|
||||||
<label>What is the third letter of Alphabet?</label> <br>
|
|
||||||
<input type="radio" name="q3" value="A">A <br>
|
|
||||||
<input type="radio" name="q3" value="B">B <br>
|
|
||||||
<input type="radio" name="q3" value="C">C <br>
|
|
||||||
<input type="radio" name="q3" value="D">D <br> <br>
|
|
||||||
|
|
||||||
<label>What is the fourth letter of Alphabet?</label> <br>
|
|
||||||
<input type="radio" name="q4" value="A">A <br>
|
|
||||||
<input type="radio" name="q4" value="B">B <br>
|
|
||||||
<input type="radio" name="q4" value="C">C <br>
|
|
||||||
<input type="radio" name="q4" value="D">D <br> <br>
|
|
||||||
|
|
||||||
<input type="submit" value="Submit">
|
|
||||||
</fieldset>
|
|
||||||
</form>
|
|
@ -1,24 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<title>Result</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<?php
|
|
||||||
$points = 0;
|
|
||||||
$q1 = $_POST['q1'];
|
|
||||||
$q2 = $_POST['q2'];
|
|
||||||
$q3 = $_POST['q3'];
|
|
||||||
$q4 = $_POST['q4'];
|
|
||||||
|
|
||||||
if($q1 == "A") $points++;
|
|
||||||
if($q2 == "B") $points++;
|
|
||||||
if($q3 == "C") $points++;
|
|
||||||
if($q4 == "D") $points++;
|
|
||||||
|
|
||||||
echo "<p>Questions got right = $points</p>"
|
|
||||||
?>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,48 +0,0 @@
|
|||||||
<!doctype html>
|
|
||||||
<html>
|
|
||||||
<head lang="sv"></head>
|
|
||||||
<body>
|
|
||||||
<h1>Send data via url</h1>
|
|
||||||
|
|
||||||
<form action="result.php" method="post">
|
|
||||||
<fieldset>
|
|
||||||
<legend>Quizz</legend>
|
|
||||||
<label>What is the first letter of Alphabet?</label> <br>
|
|
||||||
<input type="radio" name="q1" value="A">A <br>
|
|
||||||
<input type="radio" name="q1" value="B">B <br>
|
|
||||||
<input type="radio" name="q1" value="C">C <br>
|
|
||||||
<input type="radio" name="q1" value="D">D <br> <br>
|
|
||||||
|
|
||||||
<label>What is the second letter of Alphabet?</label> <br>
|
|
||||||
<input type="radio" name="q2" value="A">A <br>
|
|
||||||
<input type="radio" name="q2" value="B">B <br>
|
|
||||||
<input type="radio" name="q2" value="C">C <br>
|
|
||||||
<input type="radio" name="q2" value="D">D <br> <br>
|
|
||||||
|
|
||||||
<label>What is the third letter of Alphabet?</label> <br>
|
|
||||||
<input type="radio" name="q3" value="A">A <br>
|
|
||||||
<input type="radio" name="q3" value="B">B <br>
|
|
||||||
<input type="radio" name="q3" value="C">C <br>
|
|
||||||
<input type="radio" name="q3" value="D">D <br> <br>
|
|
||||||
|
|
||||||
<label>What is the fourth letter of Alphabet?</label> <br>
|
|
||||||
<input type="radio" name="q4" value="A">A <br>
|
|
||||||
<input type="radio" name="q4" value="B">B <br>
|
|
||||||
<input type="radio" name="q4" value="C">C <br>
|
|
||||||
<input type="radio" name="q4" value="D">D <br> <br>
|
|
||||||
|
|
||||||
<label>What is the fifth letter of Alphabet?</label> <br>
|
|
||||||
<input type="radio" name="q5" value="E">E <br>
|
|
||||||
<input type="radio" name="q5" value="F">F <br>
|
|
||||||
<input type="radio" name="q5" value="G">G <br>
|
|
||||||
<input type="radio" name="q5" value="H">H <br> <br>
|
|
||||||
|
|
||||||
<label>What is the sixth letter of Alphabet?</label> <br>
|
|
||||||
<input type="radio" name="q6" value="E">E <br>
|
|
||||||
<input type="radio" name="q6" value="F">F <br>
|
|
||||||
<input type="radio" name="q6" value="G">G <br>
|
|
||||||
<input type="radio" name="q6" value="H">H <br> <br>
|
|
||||||
|
|
||||||
<input type="submit" value="Submit">
|
|
||||||
</fieldset>
|
|
||||||
</form>
|
|
@ -1,35 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<title>Result</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<?php
|
|
||||||
$points = 0;
|
|
||||||
$q1 = $_POST['q1'];
|
|
||||||
$q2 = $_POST['q2'];
|
|
||||||
$q3 = $_POST['q3'];
|
|
||||||
$q4 = $_POST['q4'];
|
|
||||||
$q5 = $_POST['q5'];
|
|
||||||
$q6 = $_POST['q6'];
|
|
||||||
|
|
||||||
$result;
|
|
||||||
|
|
||||||
if($q1 == "A") $points++;
|
|
||||||
if($q2 == "B") $points++;
|
|
||||||
if($q3 == "C") $points++;
|
|
||||||
if($q4 == "D") $points++;
|
|
||||||
if($q5 == "E") $points++;
|
|
||||||
if($q6 == "F") $points++;
|
|
||||||
|
|
||||||
if($points >= 5) $result = "Bra, du behärskar det mesta";
|
|
||||||
else if($points >= 3) $result = "Godkänd";
|
|
||||||
else $result = "Läs på mer och försök igen";
|
|
||||||
|
|
||||||
|
|
||||||
echo "<p>$result, poäng - $points</p>"
|
|
||||||
?>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
11
www/public/M1/index.php
Normal file
11
www/public/M1/index.php
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>M1-test</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<?php echo "Hello world"?>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in New Issue
Block a user