<?php
// Define the age and HC arrays
$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);
$hc = array(1000, 2000, 2500, 3000, 4000, 5000);
// Check if the form has been submitted
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
// Get the selected gender and age range
$gender = $_POST['gender'];
$ageRange = $_POST['ageRange'];
// Select the appropriate age array based on the age range
switch ($ageRange) {
case 'age1':
$age = $age1;
break;
case 'age2':
$age = $age2;
break;
case 'age3':
$age = $age3;
break;
case 'age4':
$age = $age4;
break;
case 'age5':
$age = $age5;
break;
default:
$age = $age1;
break;
}
// Output the selected health care costs for the chosen gender, age range, and HC values
echo "Health Care Costs for $gender ($ageRange) and hc:<br>";
for ($i = 0; $i < count($age); $i++) {
echo "$" . $age[$i] . " hc " . $hc[$i] . "<br>";
}
}
?>
<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>
<label for="ageRange">Select age range:</label>
<select name="ageRange" id="ageRange">
<option value="age1">Age 1</option>
<option value="age2">Age 2</option>
<option value="age3">Age 3</option>
<option value="age4">Age 4</option>
<option value="age5">Age 5</option>
</select><br>
<input type="submit" value="Submit">
</form>
เวอไนน์ไอคอร์ส
ประหยัดเวลากว่า 100 เท่า!
เวอไนน์เว็บไซต์⚡️
สร้างเว็บไซต์ ดูแลเว็บไซต์
Categories
- ai (1)
- cat (1)
- computer internet (285)
- food (2)
- med (23)
- Music Movie (31)
- tool (43)
- ฮวงจุ้ย (9)
- Travel (69)
- Uncategorized (1,439)
- web (628)
- ปุ่มคัดลอก และ ปุ่มลบ มีปัญหา มันจะไปคัดลอกและลบไม่ตรงแถว (โปรแกรมกรีดยางพารา)
- คอลั่ม paid ไม่อ่านค่าใน local storage
- ทำไม เมื่อปิด browser brave แล้วเปิดใหม่ ข้อมูลใน Local storage หาย ครับ
- เพิ่มคอมม่า v69=comma+preview.html
- ใส่ comma ในตัวเลข
- สรุปฟังก์ชันและประโยชน์พิเศษของโปรแกรมตารางบันทึกข้อมูลลูกค้า
- code v66 vs v66-1 ต่างกันอย่างไร
- ข้อมูล Local storage หายไปเอง
- แก้codeต้องแก้ database ให้ตรงกัน
- hover ในช่อง input ทำให้ input ลอยตัว
- โปรแกรมที่เก็บข้อมูลแบบ local storage มีความปลอดภัยแค่ไหน?
- ฟังก์ชั่น ยืดขยายช่อง Threshold (ขีดจำกัด) ในการขยายตัวนั้นสูงเกินไป
- เมื่อให้ gemini บันทึก จดจำไว้ เมื่อต้องการคุยต่อ เข้ามาแชทนี้ หรือ เปิดแชทไหม ต้องอ้างอิงอย่างไร คุณจึงจำได้ ต่อเนื่อง?
- โปรแกรมของเราใช้ html ไฟล์เดียว ถ้าเราเปลี่ยนนามสกุล เป็น .php การทำงานจะต่างกันไหม? มีประโยชน์ในแง่ไหน ความปลอดภัยเป็นยังไง
- เมื่อคุณเปิดลิงก์ใด ๆ ผ่านแอปพลิเคชันอย่าง LINE, Facebook Messenger, หรือแอปโซเชียลมีเดียอื่น ๆ
- การแปลง font .ttf เป็น .js
- โปรแกรมบันทึกข้อมูล
- Protected: ใส่รหัสก่อนส่งฟอร์มเมล (ไม่ต้องมีฐานข้อมูล)
- port 465 vs 587
- ถ้าถูกแฮกhost รหัสเมล ก็ถูกไปด้วย การทำ stmp เนี่ย