You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
814 B
PHTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Weight Converter</title>
<style>
body { font-family: Arial; text-align: center; margin-top: 80px; }
input { padding: 10px; width: 200px; margin: 10px; }
button { padding: 10px 20px; cursor: pointer; }
</style>
</head>
<body>
<h1>Weight Converter</h1>
<form method="POST" action="/convert">
@csrf
<input type="number" step="0.01" name="kg" placeholder="Enter KG" value="{{ old('kg', $kg ?? '') }}">
<br>
<input type="number" step="0.01" name="lbs" placeholder="Enter LBS" value="{{ old('lbs', $lbs ?? '') }}">
<br>
<button type="submit">Convert</button>
</form>
@isset($result)
<h2>{{ $result }}</h2>
@endisset
</body>
</html>