โค๊ต php สำหรับสร้างเว็บ โปรแกรมปริมาตรทรงลูกบาศก์ พัฒนาด้วยภาษาphp
ตัวอย่างลักษณะของจอภาพเมื่อขึ้นบนเว็บไซต์ของเรา
โปรแกรมปริมาตรทรงลูกบาศก์ |
|
ความยาวด้าน : |
|
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>โปรแกรมปริมาตรทรงลูกบาศก์</title>
<style type=”text/css”>
<!–
body {
background-color:#C66;
}
–>
</style></head>
<body>
<form action=”process.php” method=”post”>
<table width=”393″ border=”0″ align=”center” bgcolor=”#FFFFFF”>
<tr>
<td colspan=”2″>
<div align=”center”><strong>โปรแกรมปริมาตรทรงลูกบาศก์</strong></div></td>
</tr>
<tr>
<td width=”171″><div align=”right”>ความยาวด้าน : </div></td>
<td width=”212″><input type=”text” name=”num” size=”20″ maxlength=”100″ /></td>
</tr>
<tr>
<td colspan=”2″> <div align=”center”><input type=”submit” value=”คำนวณ” /></div></td>
</tr>
</table>
<div align=”center”></div>
</body>
</html>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>ประมวลผล โปรแกรมปริมาตรทรงลูกบาศก์</title>
</head>
<body bgcolor=”#FFFFFF”>
<div align=”center”>
<?php
$num=$_POST[‘num’];
$sum=$num*$num*$num;
echo “ปริมาตรทรงลูกบาศกคือ : “.$sum;
?>
</div>
</body>
</html>
โค๊ต php สำหรับสร้างเว็บ โปรแกรมปริมาตรทรงปริซึม พัฒนาด้วยภาษาphp
ตัวอย่างลักษณะของจอภาพเมื่อขึ้นบนเว็บไซต์ของเรา
โปรแกรมปริมาตรทรงปริซึม |
|
พื้นที่ฐาน : |
|
ความสูง : |
|
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>โปรแกรมปริมาตรทรงปริซึม</title>
<style type=”text/css”>
<!–
body {
background-color:#F63;
}
–>
</style></head>
<body>
<form action=”process.php” method=”post”>
<table width=”393″ border=”0″ align=”center” bgcolor=”#FFFFFF”>
<tr>
<td colspan=”2″>
<div align=”center”><strong>โปรแกรมปริมาตรทรงปริซึม</strong></div></td>
</tr>
<tr>
<td width=”171″><div align=”right”>พื้นที่ฐาน : </div></td>
<td width=”212″><input type=”text” name=”num1″ size=”20″ maxlength=”100″ /></td>
</tr>
<tr>
<td width=”171″><div align=”right”>ความสูง : </div></td>
<td width=”212″><input type=”text” name=”num2″ size=”20″ maxlength=”100″ /></td>
</tr>
<tr>
<td colspan=”2″> <div align=”center”><input type=”submit” value=”คำนวณ” /></div></td>
</tr>
</table>
<div align=”center”></div>
</body>
</html>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>ประมวลผล โปรแกรมปริมาตรทรงปริซึม</title>
</head>
<body bgcolor=”#FFFFFF”>
<div align=”center”>
<?php
$num1=$_POST[‘num1’];
$num2=$_POST[‘num2’];
$sum=$num1*$num2;
echo “ปริมาตรทรงปริซึมคือ : “.$sum;
?>
</div>
</body>
</html>
โค๊ต php สำหรับสร้างเว็บ โปรแกรมสปินบทความ Free Article Spinner พัฒนาด้วยภาษาphp
ตัวอย่างลักษณะของจอภาพเมื่อขึ้นบนเว็บไซต์ของเรา
โปรแกรมสปินบทความ Free Article Spinner |
|
บทความ : |
|
1.Keyword : |
สปินเป็น |
2.Keyword : |
สปินเป็น |
3.Keyword : |
สปินเป็น |
4.Keyword : |
สปินเป็น |
5.Keyword : |
สปินเป็น |
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>ตัวอย่าง โปรแกรมสปินบทความ Free Article Spinner</title>
<style type=”text/css”>
<!–
body {
background-color:#C60;
color:#fff;
}
–>
</style></head>
<body>
<form action=”process.php” method=”post”>
<table width=”500″ border=”0″ align=”center”>
<tr>
<td colspan=”2″>
<div align=”center”><h2>โปรแกรมสปินบทความ Free Article Spinner</h2></div></td>
</tr>
<tr>
<td width=”150″ valign=”top”><div align=”right”>บทความ : </div></td>
<td width=”212″><textarea rows=”10″ cols=”60″ id=”article” name=”article” placeholder=”บทความที่ต้องการจะสปีน” ></textarea></td>
</tr>
<tr>
<td ><div align=”right”>1.Keyword : </div></td>
<td width=”212″><input type=”text” name=”keyword1″ size=”25″ maxlength=”25″ />
สปินเป็น <input type=”text” name=”spin1″ size=”25″ maxlength=”25″ />
</td>
</tr>
<tr>
<td ><div align=”right”>2.Keyword : </div></td>
<td width=”212″><input type=”text” name=”keyword2″ size=”25″ maxlength=”25″ />
สปินเป็น <input type=”text” name=”spin2″ size=”25″ maxlength=”25″ />
</td>
</tr>
<tr>
<td ><div align=”right”>3.Keyword : </div></td>
<td width=”212″><input type=”text” name=”keyword3″ size=”25″ maxlength=”25″ />
สปินเป็น <input type=”text” name=”spin3″ size=”25″ maxlength=”25″ />
</td>
</tr>
<tr>
<td ><div align=”right”>4.Keyword : </div></td>
<td width=”212″><input type=”text” name=”keyword4″ size=”25″ maxlength=”25″ />
สปินเป็น <input type=”text” name=”spin4″ size=”25″ maxlength=”25″ />
</td>
</tr>
<tr>
<td ><div align=”right”>5.Keyword : </div></td>
<td width=”212″><input type=”text” name=”keyword5″ size=”25″ maxlength=”25″ />
สปินเป็น <input type=”text” name=”spin5″ size=”25″ maxlength=”25″ />
</td>
</tr>
<tr>
<td colspan=”2″> <div align=”center”><input type=”submit” value=”สปีนบทความชิ้นนี้” /></div></td>
</tr>
<tr>
<td colspan=”2″ style=”font-size:14px; color:#F00;” align=”center”></td>
</tr>
</table>
<div align=”center”></div>
</body>
</html>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>ประมวลผล โปรแกรมสปินบทความ Free Article Spinner</title>
</head>
<body>
<div align=”center”>
<h2>โปรแกรมสปินบทความ Free Article Spinner</h2>
<?
$article=$_POST[‘article’];
$keyword1=$_POST[‘keyword1’];
$keyword2=$_POST[‘keyword2’];
$keyword3=$_POST[‘keyword3’];
$keyword4=$_POST[‘keyword4’];
$keyword5=$_POST[‘keyword5’];
$spin1=$_POST[‘spin1’];
$spin2=$_POST[‘spin2’];
$spin3=$_POST[‘spin3’];
$spin4=$_POST[‘spin4’];
$spin5=$_POST[‘spin5’];
$article_spin=$article;
if($keyword1!=”){
$article_spin=str_replace($keyword1,$spin1,$article_spin,&$count);
}
if($keyword2!=”){
$article_spin=str_replace($keyword2,$spin2,$article_spin,&$count);
}
if($keyword3!=”){
$article_spin=str_replace($keyword3,$spin3,$article_spin,&$count);
}
if($keyword4!=”){
$article_spin=str_replace($keyword4,$spin4,$article_spin,&$count);
}
if($keyword5!=”){
$article_spin=str_replace($keyword5,$spin5,$article_spin,&$count);
}
?>
<div style=”width:500px;” align=”left”>
<?
echo ‘<b>’.”บทความต้นฉบับ”.'</b>’.'<br><br>’;
echo $article.'<br><br><br>’;
echo ‘<b>’.”บทความที่spinแล้ว”.'</b>’.'<br><br>’;
echo $article_spin.'<br><br>’;
?>
</div>
</div>
</body>
</html>
</html>
โค๊ต php สำหรับสร้างเว็บ คำนวณพลังงานไฟฟ้าจากเครื่องใช้ไฟฟ้า พัฒนาด้วยภาษาphp
ตัวอย่างลักษณะของจอภาพเมื่อขึ้นบนเว็บไซต์ของเรา
โปรแกรมคำนวณพลังงานไฟฟ้าจากเครื่องใช้ไฟฟ้า |
|
เครื่องใช้ไฟฟ้าขนาด : |
วัตต์ |
ยูนิละ : |
บาท |
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>ตัวอย่าง โปรแกรมคำนวณพลังงานไฟฟ้าจากเครื่องใช้ไฟฟ้า</title>
<style type=”text/css”>
<!–
body {
background-color:#F66;
color:#fff;
}
–>
</style></head>
<body>
<form action=”process.php” method=”post”>
<table width=”500″ border=”0″ align=”center”>
<tr>
<td colspan=”2″>
<div align=”center”><h2>โปรแกรมคำนวณพลังงานไฟฟ้าจากเครื่องใช้ไฟฟ้า</h2></div></td>
</tr>
<tr>
<td width=”150″><div align=”right”>เครื่องใช้ไฟฟ้าขนาด : </div></td>
<td width=”212″><input type=”text” name=”watt” size=”20″ maxlength=”100″ /> วัตต์</td>
</tr>
<tr>
<td width=”150″><div align=”right”>ยูนิละ : </div></td>
<td width=”212″><input type=”text” name=”uni” size=”20″ maxlength=”100″ /> บาท</td>
</tr>
<tr>
<td colspan=”2″> <div align=”center”><input type=”submit” value=”คำนวณ” /></div></td>
</tr>
<tr>
<td colspan=”2″ style=”font-size:14px; color:#F00;” align=”center”></td>
</tr>
</table>
<div align=”center”></div>
</body>
</html>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>ประมวลผล โปรแกรมคำนวณพลังงานไฟฟ้าจากเครื่องใช้ไฟฟ้า</title>
</head>
<body>
<div align=”center”>
<h2>โปรแกรมคำนวณพลังงานไฟฟ้าจากเครื่องใช้ไฟฟ้า</h2>
<?
$watt=$_POST[‘watt’];
$uni=$_POST[‘uni’];
$watt=$watt/100;
$sum=$watt*$uni;
$month=$sum*30;
echo “จะเสียค่าไฟฟ้าวันละ “.$sum.” บาท”.”<br>”;
echo “ดังนั้น เสียค่าไฟฟ้าต่อเดือน “.$month.” บาทต่อเดือน (30 วัน)”;
?>
</div>
</body>
</html>
โค๊ต php สำหรับสร้างเว็บ โปรแกรมปริมาตรทรงปริซึม พัฒนาด้วยภาษาphp
ตัวอย่างลักษณะของจอภาพเมื่อขึ้นบนเว็บไซต์ของเรา
โปรแกรมคำนวณอัตราผลตอบแทนการลงทุน |
|
กระแสเงินสดที่ได้รับ : |
ต่อเดือน |
เงินลงทุน : |
|
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>ตัวอย่าง โปรแกรมคำนวณอัตราผลตอบแทนการลงทุน</title>
<style type=”text/css”>
<!–
body {
background-color:#FF9;
color:#000;
}
–>
</style></head>
<body>
<form action=”process.php” method=”post”>
<table width=”500″ border=”0″ align=”center”>
<tr>
<td colspan=”2″>
<div align=”center”><h2>โปรแกรมคำนวณอัตราผลตอบแทนการลงทุน</h2></div></td>
</tr>
<tr>
<td width=”150″><div align=”right”>กระแสเงินสดที่ได้รับ : </div></td>
<td width=”212″><input type=”text” name=”money” size=”20″ maxlength=”100″ /> ต่อเดือน</td>
</tr>
<tr>
<td width=”150″><div align=”right”>เงินลงทุน : </div></td>
<td width=”212″><input type=”text” name=”investment” size=”20″ maxlength=”100″ /> </td>
</tr>
<tr>
<td colspan=”2″> <div align=”center”><input type=”submit” value=”คำนวณ” /></div></td>
</tr>
<tr>
<td colspan=”2″ style=”font-size:14px; color:#F00;” align=”center”></td>
</tr>
</table>
<div align=”center”></div>
</body>
</html>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>ประมวลผล โปรแกรมคำนวณอัตราผลตอบแทนการลงทุน</title>
</head>
<body>
<div align=”center”>
<h2>โปรแกรมคำนวณอัตราผลตอบแทนการลงทุน</h2>
<?php
$money=$_POST[‘money’];
$investment=$_POST[‘investment’];
$money_year=$money*12;
$sum=$money_year*100/$investment;
echo “กระแสเงินสดที่ได้รับ : “.number_format($money,2).” บาทต่อเดือน”.”<br>”;
echo “กระแสเงินสดรวม : “.number_format($money_year,2).” บาทต่อปี”.”<br><br>”;
echo “คิดเป็นอัตราผลตอบแทน : “.$sum.” % ต่อปี”;
?>
</div>
</body>
</html>
โค๊ต php สำหรับสร้างเว็บ โปรแกรมคำนวณอัตราแลกเปลี่ยนเงินตราต่างประเทศ พัฒนาด้วยภาษาphp
ตัวอย่างลักษณะของจอภาพเมื่อขึ้นบนเว็บไซต์ของเรา
โปรแกรมคำนวณอัตราแลกเปลี่ยนเงินตราต่างประเทศ |
|
จำนวนเงิน : |
บาทไทย (THB) |
เลือกสกุลเงิน : |
|
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>ตัวอย่าง โปรแกรมคำนวณอัตราแลกเปลี่ยนเงินตราต่างประเทศ</title>
<style type=”text/css”>
<!–
body {
background-color:#69C;
color:#fff;
}
–>
</style></head>
<body>
<form action=”process.php” method=”post”>
<table width=”500″ border=”0″ align=”center”>
<tr>
<td colspan=”2″>
<div align=”center”><h2>โปรแกรมคำนวณอัตราแลกเปลี่ยนเงินตราต่างประเทศ</h2></div></td>
</tr>
<tr>
<td width=”150″><div align=”right”>จำนวนเงิน : </div></td>
<td width=”212″><input type=”text” name=”money” size=”20″ maxlength=”100″ /> บาทไทย (THB)</td>
</tr>
<tr>
<td width=”150″><div align=”right”>เลือกสกุลเงิน : </div></td>
<td width=”212″><select name=”coin” >
<option value=”1″ >กีบลาว (LAK)</option>
<option value=”2″ >จ๊าดพม่า (MMK)</option>
<option value=”3″ >ดงเวียดนาม (VND)</option>
<option value=”4″ >ดอลลาร์สิงคโปร์ (SGD)</option>
<option value=”5″ >ดอลลาร์ออสเตรเลีย (AUD)</option>
<option value=”6″ >ดอลลาร์ฮ่องกง (HKD)</option>
<option value=”7″ >ดอลลาร์ไต้หวันใหม่ (TWD)</option>
<option value=”8″ >ปอนด์ (GBP)</option>
<option value=”9″ >ยูโร (EUR)</option>
<option value=”10″ >ริงกิตมาเลเซีย (MYR)</option>
<option value=”11″ >สหดอลลาร์สหรัฐอเมริกา (USD)</option>
<option value=”12″ >เกาหลีวอน (KRW)</option>
<option value=”13″ >เงินรูปีของอินเดีย (INR)</option>
<option value=”14″ >เงินเยนของญี่ปุ่น (JPY)</option>
</select></td>
</tr>
<tr>
<td colspan=”2″> <div align=”center”><input type=”submit” value=”คำนวณ” /></div></td>
</tr>
<tr>
<td colspan=”2″ style=”font-size:14px; color:#F00;” align=”center”></td>
</tr>
</table>
<div align=”center”></div>
</body>
</html>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>ประมวลผล โปรแกรมคำนวณอัตราแลกเปลี่ยนเงินตราต่างประเทศ</title>
</head>
<body>
<div align=”center”>
<h2>โปรแกรมคำนวณอัตราแลกเปลี่ยนเงินตราต่างประเทศ</h2>
<?php
$money=$_POST[‘money’];
$coin=$_POST[‘coin’];
switch ($coin) {
case 1:
$coin_m=240.49;
$sum=$money*$coin_m;
echo “1 บาทไทย (THB) = “.$coin_m.” กีบลาว (LAK)”.”<br><br>”;
echo “จำนวน “.number_format($money,2).” บาท = “.number_format($sum,2).” กีบลาว (LAK)”;
break;
case 2:
$coin_m=50;
$sum=$money*$coin_m;
echo “1 บาทไทย (THB) = “.$coin_m.” จ๊าดพม่า (MMK)”.”<br><br>”;
echo “จำนวน “.number_format($money,2).” บาท = “.number_format($sum,2).” จ๊าดพม่า (MMK)”;
break;
case 3:
$coin_m=600;
$sum=$money*$coin_m;
echo “1 บาทไทย (THB) = “.$coin_m.” ดงเวียดนาม (VND)”.”<br><br>”;
echo “จำนวน “.number_format($money,2).” บาท = “.number_format($sum,2).” ดงเวียดนาม (VND)”;
break;
case 4:
$coin_m=0.04;
$sum=$money*$coin_m;
echo “1 บาทไทย (THB) = “.$coin_m.” ดอลลาร์สิงคโปร์ (SGD)”.”<br><br>”;
echo “จำนวน “.number_format($money,2).” บาท = “.number_format($sum,2).” ดอลลาร์สิงคโปร์ (SGD)”;
break;
case 5:
$coin_m=0.05;
$sum=$money*$coin_m;
echo “1 บาทไทย (THB) = “.$coin_m.” ดอลลาร์ออสเตรเลีย (AUD)”.”<br><br>”;
echo “จำนวน “.number_format($money,2).” บาท = “.number_format($sum,2).” ดอลลาร์ออสเตรเลีย (AUD)”;
break;
case 6:
$coin_m=0.2;
$sum=$money*$coin_m;
echo “1 บาทไทย (THB) = “.$coin_m.” ดอลลาร์ฮ่องกง (HKD)”.”<br><br>”;
echo “จำนวน “.number_format($money,2).” บาท = “.number_format($sum,2).” ดอลลาร์ฮ่องกง (HKD)”;
break;
case 7:
$coin_m=1;
$sum=$money*$coin_m;
echo “1 บาทไทย (THB) = “.$coin_m.” ดอลลาร์ไต้หวันใหม่ (TWD)”.”<br><br>”;
echo “จำนวน “.number_format($money,2).” บาท = “.number_format($sum,2).” ดอลลาร์ไต้หวันใหม่ (TWD)”;
break;
case 8:
$coin_m=0.02;
$sum=$money*$coin_m;
echo “1 บาทไทย (THB) = “.$coin_m.” ปอนด์ (GBP)”.”<br><br>”;
echo “จำนวน “.number_format($money,2).” บาท = “.number_format($sum,2).” ปอนด์ (GBP)”;
break;
case 9:
$coin_m=0.03;
$sum=$money*$coin_m;
echo “1 บาทไทย (THB) = “.$coin_m.” ยูโร (EUR)”.”<br><br>”;
echo “จำนวน “.number_format($money,2).” บาท = “.number_format($sum,2).” ยูโร (EUR)”;
break;
case 10:
$coin_m=0.11;
$sum=$money*$coin_m;
echo “1 บาทไทย (THB) = “.$coin_m.” ริงกิตมาเลเซีย (MYR)”.”<br><br>”;
echo “จำนวน “.number_format($money,2).” บาท = “.number_format($sum,2).” ริงกิตมาเลเซีย (MYR)”;
break;
case 11:
$coin_m=0.03;
$sum=$money*$coin_m;
echo “1 บาทไทย (THB) = “.$coin_m.” สหดอลลาร์สหรัฐอเมริกา (USD)”.”<br><br>”;
echo “จำนวน “.number_format($money,2).” บาท = “.number_format($sum,2).” สหดอลลาร์สหรัฐอเมริกา (USD)”;
break;
case 12:
$coin_m=33;
$sum=$money*$coin_m;
echo “1 บาทไทย (THB) = “.$coin_m.” เกาหลีวอน (KRW)”.”<br><br>”;
echo “จำนวน “.number_format($money,2).” บาท = “.number_format($sum,2).” เกาหลีวอน (KRW)”;
break;
case 13:
$coin_m=1.9;
$sum=$money*$coin_m;
echo “1 บาทไทย (THB) = “.$coin_m.” เงินรูปีของอินเดีย (INR)”.”<br><br>”;
echo “จำนวน “.number_format($money,2).” บาท = “.number_format($sum,2).” เงินรูปีของอินเดีย (INR)”;
break;
case 14:
$coin_m=3.58757333;
$sum=$money*$coin_m;
echo “1 บาทไทย (THB) = “.$coin_m.” เงินเยนของญี่ปุ่น (JPY)”.”<br><br>”;
echo “จำนวน “.number_format($money,2).” บาท = “.number_format($sum,2).” เงินเยนของญี่ปุ่น (JPY)”;
break;
}
?>
</div>
</body>
</html>
โค๊ต php สำหรับสร้างเว็บ โปรแกรมคำนวณอายุแบบพื้นฐาน พัฒนาด้วยภาษาphp
ตัวอย่างลักษณะของจอภาพเมื่อขึ้นบนเว็บไซต์ของเรา
โปรแกรมคำนวณอายุ แบบพื้นฐาน |
|
เกิดปีพ.ศ. : |
|
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>ตัวอย่าง โปรแกรมคำนวณอายุ แบบพื้นฐาน</title>
<style type=”text/css”>
<!–
body {
background-color:#6633CC;
color:#FFF;
}
–>
</style></head>
<body>
<form action=”process.php” method=”post”>
<table width=”600″ border=”0″ align=”center”>
<tr>
<td colspan=”2″>
<div align=”center”><h2>โปรแกรมคำนวณอายุ แบบพื้นฐาน</h2></div></td>
</tr>
<tr>
<td width=”200″><div align=”right”>เกิดปีพ.ศ. : </div></td>
<td width=”212″><input type=”text” name=”year” size=”20″ maxlength=”100″ /></td>
</tr>
<tr>
<td colspan=”2″> <div align=”center”><input type=”submit” value=”คำนวณ” /></div></td>
</tr>
<tr>
<td colspan=”2″ style=”font-size:14px; color:#F00;” align=”center”></td>
</tr>
</table>
<div align=”center”></div>
</body>
</html>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>ประมวลผล โปรแกรมคำนวณอายุ แบบพื้นฐาน</title>
</head>
<body>
<div align=”center”>
<?php
$year=$_POST[‘year’];
$d=date(“Y”);
$d=$d+543;
$sum=$d-$year;
?>
<p align=”center”>
<h2>โปรแกรมคำนวณอายุ แบบพื้นฐาน</h2>
<b>คุณอายุ : </b><?php echo $sum;?> ปี <br /><br />
</p>
</div>
</body>
</html>
ที่มาโค๊ต php นี้ ข้อขอบคุณบทความดีๆจากเว็บ ที่มา # https://www.rangforever.com/exercise_title.php?id_e=1
โค๊ต php ฟรีสำหรับทำเว็บต่างๆ สร้างเว็บ โปรแกรมปริมาตรทรงลูกบาศก์ สร้างเว็บ โปรแกรมปริมาตรทรงปริซึม สร้างเว็บ โปรแกรมสปินบทความ Free Article Spinner สร้างเว็บ คำนวณพลังงานไฟฟ้าจากเครื่องใช้ไฟฟ้า สร้างเว็บ โปรแกรมปริมาตรทรงปริซึม สร้างเว็บ โปรแกรมคำนวณอัตราแลกเปลี่ยนเงินตราต่างประเทศ สร้างเว็บ โปรแกรมคำนวณอายุแบบพื้นฐาน