<? session_start(); if($_SESSION["lang"] == "EN") { include("en.php"); } else { include("th.php"); } ?>
<? $strTitle = "ยินดีต้อนรับเข้าสู่เว็บไซต์ของฉัน"; $strHome = "หน้าแรก"; $strService = "บริการของเรา"; $strAbout = "เกี่ยวกับเรา"; $strContact = "ติดต่อเรา"; //** สมมุติค่ามาจาก Database ที่ได้จากการ Query ***// $result["DETAIL_TH"] = "นี้คือเนื้อหาภาษาไทย"; $strDetail = $result["DETAIL_TH"]; ?>
<? $strTitle = "Welcome to My Web Site"; $strHome = "Home"; $strService = "Service"; $strAbout = "About Us"; $strContact = "Contact Us"; //** สมมุติค่ามาจาก Database ที่ได้จากการ Query ***// $result["DETAIL_EN"] = "This is content English"; $strDetail = $result["DETAIL_EN"]; ?>
//** สมมุติค่ามาจาก Database ที่ได้จากการ Query ***// $result["DETAIL_EN"] = "This is content English"; $strDetail = $result["DETAIL_EN"];
<?php $host="localhost"; $user="root"; $pw="root"; $dbname="translate"; $c = mysql_connect($host, $user, $pw); mysql_query("SET NAMES UTF8") or die(mysql_error()); if (!$c) { echo "<h3>ERROR : ไม่สามารติดต่อฐานข้อมูลได้</h3>"; exit(); } ?>
<? include ('connect.php'); $strTitle = "ยินดีต้อนรับเข้าสู่เว็บไซต์ของฉัน"; $strHome = "หน้าหลัก"; $strService = "บริการ"; $strAbout = "เกี่ยวกับเรา"; $strContact = "ติดต่อเรา"; //** สมมุติค่ามาจาก Database ที่ได้จากการ Query ***// $sql = "select * from type_th"; $result=mysql_db_query($dbname,$sql); while ($rs=mysql_fetch_array($result)){ $strDetail=$rs[name_th]; } ?>
<? include ('connect.php'); $strTitle = "ยินดีต้อนรับเข้าสู่เว็บไซต์ของฉัน"; $strHome = "หน้าหลัก"; $strService = "บริการ"; $strAbout = "เกี่ยวกับเรา"; $strContact = "ติดต่อเรา"; //** สมมุติค่ามาจาก Database ที่ได้จากการ Query ***// $sql = "select * from type_th"; $result=mysql_db_query($dbname,$sql); while ($rs=mysql_fetch_array($result)){ $strDetail=$rs[name_en]; } ?>
<? session_start(); $_SESSION["lang"] = $_GET["lang"]; session_write_close(); header("location:menu.php"); ?>
<? session_start(); if($_SESSION["lang"] == "EN") { include("en.php"); } else { include("th.php"); } ?> <html> <head> <title><?=$strTitle;?></title> <meta http-equiv="Content-Type" content="text/html; charset=windows-874"> </head> <body> <table width="452" border="1" cellpadding="1" cellspacing="1"> <tr> <td><?=$strHome;?></td> <td><?=$strService;?></td> <td><?=$strAbout;?></td> <td><?=$strContact;?></td> </tr> </table> <br> <br> <?=$strDetail;?> <br> <br> <br> <strong>Language</strong><br> <a href="change.php?lang=TH">TH</a> , <a href="change.php?lang=EN">EN</a> </body> </html>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง