commit existing workshops

This commit is contained in:
boris committed 2024-10-17 00:35:53 +01:00
1 parent 4070dc5367
commit ed02b435fe
74 files changed
+1083 -91

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
<?php
$view = new stdClass();
$view->pageTitle = 'Converter';
require_once('Models/Converter.php');
if(isset($_POST['submit'])) {
$converter = new Converter($_POST['number'],$_POST['fromUnit'],$_POST['toUnit']);
$value = $converter->convert();
if (!$value) {
$view->value = "Invalid Number";
}
else {
$view->result = $_POST['number'] . ' ' . $_POST['fromUnit'] . ' is ' . $value . ' ' . $_POST['toUnit'] . '.';
}
}
require_once('Views/converter.phtml');