<!DOCTYPE html>
<html>
<head>
<title>Health Care Cost Calculator</title>
</head>
<body>
<h1>Health Care Cost Calculator</h1>
<form method="post">
<label for="gender">Select gender:</label>
<select name="gender" id="gender">
<option value="male">Male</option>
<option value="female">Female</option>
</select>
<br><br>
<label for="age">Select age range:</label>
<select name="age" id="age">
<option value="age1">0-20</option>
<option value="age2">21-40</option>
<option value="age3">41-60</option>
<option value="age4">61-80</option>
<option value="age5">81+</option>
</select>
<br><br>
<input type="submit" value="Calculate">
</form>
<?php
// Define the health care costs for male and female
$male_costs = array(
'age1' => array(100, 200, 250, 300, 400, 500),
'age2' => array(110, 220, 275, 330, 440, 550),
'age3' => array(130, 260, 325, 390, 520, 650),
'age4' => array(150, 300, 375, 450, 520, 750),
'age5' => array(200, 400, 500, 600, 800, 1000)
);
$female_costs = array(
'age1' => array(20, 40, 50, 60, 80, 100),
'age2' => array(24, 48, 60, 72, 96, 120),
'age3' => array(40, 80, 100, 120, 160, 200),
'age4' => array(150, 300, 375, 450, 520, 750),
'age5' => array(200, 400, 500, 600, 800, 1000)
);
// Get the selected gender and age range from the user
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$gender = $_POST['gender'];
$age_range = $_POST['age'];
// Get the corresponding health care costs for the selected gender and age range
$costs = ($gender == 'male') ? $male_costs[$age_range] : $female_costs[$age_range];
// Display the health care costs
echo "<h2>Health Care Costs for $gender ($age_range):</h2>";
echo "<ul>";
foreach ($costs as $cost) {
echo "<li>\$$cost</li>";
}
echo "</ul>";
}
?>
</body>
</html> เวอไนน์เว็บไซต์⚡️
สร้างเว็บไซต์ ดูแลเว็บไซต์
Categories
- ai (1)
- cat (1)
- computer internet (285)
- food (2)
- med (23)
- Music Movie (31)
- tool (43)
- ฮวงจุ้ย (9)
- Travel (69)
- Uncategorized (1,505)
- web (628)
- Line Liff เราพัฒนาให้มันส่งข้อความทีเดียวไปให้สมาชิกทั้งหมดทุกห้องได้ไหม กรณีทำnote
- Unable to create directory uploads/2026/09. Is its parent directory writable by the server? อัพโหลดรูปไม่ได้
- 📊 สรุปสถิติและข้อมูลเชิงลึก (Quantitative & Qualitative Insights)
- WordPress 7.1.1
- phpwind ยังมีไหม?
- การตั้งค่า LINE LIFF (LINE Front-end Framework)
- การที่เพิ่งอัปเดตเป็น WordPress 7.1.1 แล้วพบปัญหา เข้าหน้าเขียน/แก้ไข Post ไม่ได้ (เช่น หน้าจอขาว, ขึ้นหมุนค้าง หรือแสดง Error)
- ตามหลักฮวงจุ้ย ต้นกล้วยควรปลูกไว้ “นอกบ้าน” เท่านั้น และไม่ควรปลูกไว้ภายในตัวบ้านโดยเด็ดขาด
- วิธีปรับจำนวนรายการใน wordpress Theme listmode
- exo-menu ถูกบังโดย tab menu ย่อยใน หน้าสินค้า
- ทดสอบ
- path DIR
- หนี้ทางประวัติศาสตร์v(Technical Debt) และ ธุรกิจ ของ wordpress POST vs PAGE
- testtt
- มื่อลูกค้ากดลิ้ง ผ่าน line app
- ผมอยากได้ระบบง่ายและเร็วและเสถียร ใช้ได้ทุกอุปกรณ์
- บังคับให้ popup เลย
- Med Project
- Paht ของเว็บไซต์
- ให้ลูกค้าจดโดเมนเอง และ เราช่วยดูแล