diff --git a/www/public/M0/01/index.php b/www/public/M0/01/index.php index 395a266..15c7699 100644 --- a/www/public/M0/01/index.php +++ b/www/public/M0/01/index.php @@ -1,7 +1,12 @@ - - - - + + + + + + + Document + +

Matematik-test

diff --git a/www/public/M1/06/result.php b/www/public/M1/06/result.php index e1783ce..ad2adf2 100644 --- a/www/public/M1/06/result.php +++ b/www/public/M1/06/result.php @@ -28,7 +28,9 @@ else if($points >= 3) $result = "Godkänd"; else $result = "Läs på mer och försök igen"; - + //test + #test + /*test */ echo "

$result, poäng - $points

" ?> diff --git a/www/public/M2/01/handle.php b/www/public/M2/01/handle.php new file mode 100644 index 0000000..3322bcf --- /dev/null +++ b/www/public/M2/01/handle.php @@ -0,0 +1,15 @@ + + + + + + Result + + + "); + $age = strip_tags($_GET['age'], "
"); + echo "

Name - $name; Age - $age

" + ?> + + \ No newline at end of file diff --git a/www/public/M2/01/index.php b/www/public/M2/01/index.php new file mode 100644 index 0000000..1375a6f --- /dev/null +++ b/www/public/M2/01/index.php @@ -0,0 +1,24 @@ + + + + + + M2 01 + + +

Send data via url

+ + +
+ Person + + + + +
+ +
+ + + + \ No newline at end of file diff --git a/www/public/M2/02/index.php b/www/public/M2/02/index.php new file mode 100644 index 0000000..7efe76d --- /dev/null +++ b/www/public/M2/02/index.php @@ -0,0 +1,22 @@ + + + + + + M2 02 + + + "; + while($i <= 5.0) { + echo " $i, "; + $i += 0.1; + } + ?> + + + \ No newline at end of file diff --git a/www/public/M2/03/index.php b/www/public/M2/03/index.php new file mode 100644 index 0000000..ae95afb --- /dev/null +++ b/www/public/M2/03/index.php @@ -0,0 +1,20 @@ + + + + + + M2 02 + + + Välkommen"; + $page["main"] = "

Detta är innehållet på min sida

"; + $page["footer"] = "

Min sidfoot

"; + + foreach($page as $value) { + echo $value; + } + ?> + + + \ No newline at end of file diff --git a/www/public/M2/04/index.php b/www/public/M2/04/index.php new file mode 100644 index 0000000..74e6f26 --- /dev/null +++ b/www/public/M2/04/index.php @@ -0,0 +1,19 @@ + + + + + + M2 02 + + + "; + echo "Sum: " . sum($num1, $num2) . ". Difference: " .substract($num1, $num2) . ". Product: " . multiply($num1, $num2) . ". Division: " . divide($num1, $num2); + ?> + + + \ No newline at end of file diff --git a/www/public/M2/04/math.php b/www/public/M2/04/math.php new file mode 100644 index 0000000..b7bdee3 --- /dev/null +++ b/www/public/M2/04/math.php @@ -0,0 +1,18 @@ + \ No newline at end of file diff --git a/www/public/M2/05/Person.php b/www/public/M2/05/Person.php new file mode 100644 index 0000000..8705b26 --- /dev/null +++ b/www/public/M2/05/Person.php @@ -0,0 +1,35 @@ +name = $name; + $this->surname = $surname; + $this->username = $username; + $this->password = $password; + } + + public function getName() { + return $this->name; + } + + public function getSurname() { + return $this->surname; + } + + public function getUsername() { + return $this->username; + } + + public function getPassword() { + return $this->password; + } + + public function setPassword($password) { + $this->password = $password; + } +} \ No newline at end of file diff --git a/www/public/M2/05/handle.php b/www/public/M2/05/handle.php new file mode 100644 index 0000000..0cffec9 --- /dev/null +++ b/www/public/M2/05/handle.php @@ -0,0 +1,34 @@ + + + + + + M2 05 + + + "; + echo "Surname: " . $surname . "
"; + echo "Username: " . $username . "
"; + echo "Password: " . $password . "
"; + + function cleanData($data) { + $data = strip_tags($data); + $data = htmlspecialchars($data); + $data = trim($data); + $data = stripslashes($data); + return $data; + } + ?> + + \ No newline at end of file diff --git a/www/public/M2/05/index.php b/www/public/M2/05/index.php new file mode 100644 index 0000000..8cf6914 --- /dev/null +++ b/www/public/M2/05/index.php @@ -0,0 +1,24 @@ + + + + + + M2 02 + + +
+
+ Login + + + +

+ + + + + +
+
+ + \ No newline at end of file diff --git a/www/public/footer.html b/www/public/footer.html index ec823e5..c64eb42 100644 --- a/www/public/footer.html +++ b/www/public/footer.html @@ -1,7 +1,7 @@ \ No newline at end of file