Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,027

HOME > PHP > PHP Forum > อยากใช้ tis-620 กับ ajax ทำไงครับ โดยไม่ต้องแก้เป็น utf-8



 

อยากใช้ tis-620 กับ ajax ทำไงครับ โดยไม่ต้องแก้เป็น utf-8

 



Topic : 065345

Guest




คือทำงานไปแล้วกว่า 80% ถ้าจะเปลี่ยนไปใช้ utf-8 ตอนนี้คงไม่ไหว มีวิธีทำให้ใช้ ajax กับ tis-620 ได้ไหมครับ

ขอขอบคุณล่วงหน้าครับ



Tag : PHP, Ajax







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2011-08-25 08:02:41 By : turesjung View : 2203 Reply : 11
 

 

No. 1



โพสกระทู้ ( 220 )
บทความ ( 0 )



สถานะออฟไลน์
Facebook

ก็ใช้ windows-874 ครับ






แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2011-08-25 08:34:07 By : Professer
 


 

No. 2

Guest


ครับ คือตอนนี้หน้าเพจ php ทั้งหมดเป็น windows-874 แต่ปัญหาคือค่าที่ส่งมาจาก ajax เป็นภาษาต่างดาว ทั้งๆที่หน้านั้นก็กำหนดเป็น windows-874 เหมือนกัน (หรือผมเข้าใจคำอธิบายคุณ Mr. อีฟ ผิด)
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2011-08-25 08:43:18 By : turesjung
 

 

No. 3



โพสกระทู้ ( 564 )
บทความ ( 0 )



สถานะออฟไลน์
Twitter Facebook

ลองใช้ iconv("UTF-8","window-874",ค่าที่ส่งมา); ดูครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2011-08-25 09:37:47 By : kalamell
 


 

No. 4



โพสกระทู้ ( 1,095 )
บทความ ( 0 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์


เอาโค้ดมาวางด้วยครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2011-08-25 09:46:22 By : ไวยวิทย์
 


 

No. 5

Guest


customer_exe.php

Code (PHP)
<?
	session_start();
	
	include "function.php";
	include "connectDB.php";
	
	if($_SESSION["login_true"] =="")
	{
		echo "<meta http-equiv='refresh' content='0;url=index.php'>";
		exit(0);
	}
?>
<!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>
<script language="JavaScript">
function checkVal1(x) 
{
	if (x.cust_code.value == "")
	{
		alert('กรุณากรอกรหัสสมาชิก');
		return false;
	}
	
	if (x.cust_name.value == "")
	{
		alert('กรุณากรอกชื่อ-สกุลสมาชิก');
		return false;
	}
	if (x.upline_code.value == "")
	{
		alert('กรุณากรอกรหัสผู้แนะนำ');
		return false;
	}
	
	if (x.upline_name.value == "")
	{
		alert('กรุณากรอกชื่อ-สกุลผู้แนะนำ');
		return false;
	}
}

var HttPRequest = false;

function doCallAjax()
{
	HttPRequest = false;
	if(window.XMLHttpRequest)
	{
		HttPRequest = new XMLHttpRequest();
		if(HttPRequest.overrideMimeType)
		{
			HttPRequest.overrideMimeType('text/html');
		}
	}else if(window.ActiveXObject)
	{
		try
		{
			HttPRequest = new ActiveXObject("Msxml2.XMLHTTP");
		}catch(e)
		{
			try
			{
				HttPRequest = new ActiveXObject("Microsoft.XMLHTTP");
			}catch(e){}
		}
	} 
		  
	if(!HttPRequest)
	{
		alert('Cannot create XMLHTTP instance');
		return false;
	}
	
	var url = 'check_data.php';
	var pmeters = "upline_code=" + encodeURI( document.getElementById("upline_code").value);

	HttPRequest.open('POST',url,true);

	HttPRequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	HttPRequest.setRequestHeader("Content-length", pmeters.length);
	HttPRequest.setRequestHeader("Connection", "close");
	HttPRequest.send(pmeters);
			
	HttPRequest.onreadystatechange = function()
	{

		if(HttPRequest.readyState == 3) 
		{
			document.getElementById("mySpan").innerHTML = "..";
		}
	
		if(HttPRequest.readyState == 4)
		{
			if(HttPRequest.responseText == 'Y')
			{
				window.location = 'AjaxPHPRegister3.php';
			}
			else
			{
				document.getElementById("mySpan").innerHTML = HttPRequest.responseText;
			}
		}
	}
 }
</script>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
<title>-:- ระบบจัดการศูนย์Œ Trainning ARAGON 101 -:-</title>
<link href="css/templatemo_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table width="990" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><? //include "header.php"; ?></td>
  </tr>
  <tr>
    <td valign="top">
    <table width="900" height="500" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="2" bgcolor="8c0000"></td>
          <td width="896" align="center" valign="top"><table width="650" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td height="50">&nbsp;</td>
            </tr>
            <tr>
              <td align="center"><form id="form_addproduct" name="form_addproduct" method="post" action="execute.php" onsubmit="return checkVal1(document.form_addproduct);">
                <?
                	if($s == 0)
					{
				?>
                <table width="450" border="1" bordercolor="#666666" cellspacing="0" cellpadding="0">
                  <tr>
                    <td><table width="446" border="0" cellspacing="2" cellpadding="0">
                      <tr>
                        <td height="25" align="right" bgcolor="#8c0000"><span class="whitetxt"><strong>รหัสสมาชิก</strong></span>&nbsp;&nbsp;&nbsp;</td>
                        <td align="left" bgcolor="#FF9966">&nbsp;
<input name="cust_code" type="text" id="cust_code" size="20" maxlength="10" />                          
<strong><span class="alerttxt">*</span></strong></td>
                      </tr>
                      <tr>
                        <td height="25" align="right" bgcolor="#8c0000"><span class="whitetxt"><strong>ชื่อ-สกุล</strong></span>&nbsp;&nbsp;&nbsp;</td>
                        <td align="left" bgcolor="#FF9966">&nbsp;
                          <input name="cust_name" type="text" id="cust_name" size="30" maxlength="100" />                          <strong><span class="alerttxt">*</span></strong></td>
                      </tr>
                      <tr>
                        <td height="25" align="right" bgcolor="#8c0000"><span class="whitetxt"><strong>หมายเลขโทรศัพท์</strong></span>&nbsp;&nbsp;&nbsp;</td>
                        <td align="left" bgcolor="#FF9966">&nbsp;
                          <input name="cust_tel" type="text" id="cust_tel" size="20" maxlength="20" /></td>
                      </tr>
                      <tr>
                        <td height="25" align="right" bgcolor="#8c0000"><span class="whitetxt"><strong>รหัสผู้แนะนำ</strong></span>&nbsp;&nbsp;&nbsp;</td>
                        <td align="left" valign="middle" bgcolor="#FF9966">&nbsp;
                          <input name="upline_code" type="text" id="upline_code" size="20" maxlength="10" />                          <strong><span class="alerttxt">*</span></strong>&nbsp;&nbsp;<img src="images/zoom.png" alt="เธ„เน‰เธ™เธซเธฒ" width="20" height="20" align="absmiddle" border="0" onclick="JavaScript:doCallAjax();" onmouseover="this.style.cursor='hand'" /></td>
                      </tr>                      
                    </table>
                    <span id="mySpan"></span>  
                    </td>
                  </tr>
                  <tr>
                    <td align="center"><label>
                      <input name="sts" type="hidden" id="sts" value="ac" />
                      <input type="submit" name="button" id="button" value="เพิ่มข้อมูล" />
                    </label>
                      <label>
                        <input type="reset" name="button2" id="button2" value="ยกเลิก" />
                      </label></td>
                  </tr>
                </table>
                <?
					}else if($s == 1){
						
						$result_product = select("tb_product","where product_id = '$id' ");
						
						$arr = mysql_fetch_array($result_product);					
				  ?>
                <table width="450" border="1" bordercolor="#666666" cellspacing="0" cellpadding="0">
                  <tr>
                    <td><table width="446" border="0" cellspacing="2" cellpadding="0">
                      <tr>
                        <td height="25" align="right" bgcolor="#8c0000"><span class="whitetxt"><strong>เธฃเธซเธฑเธชเธชเธกเธฒเธŠเธดเธ</strong></span>&nbsp;&nbsp;&nbsp;</td>
                        <td align="left" bgcolor="#FF9966">&nbsp;
                          <input name="cust_code" type="text" id="cust_code" size="20" maxlength="10" value="<? echo $arr["cust_code"]; ?>" />
                          <strong><span class="alerttxt">*</span></strong></td>
                      </tr>
                      <tr>
                        <td height="25" align="right" bgcolor="#8c0000"><span class="whitetxt"><strong>เธŠเธทเนˆเธญเธชเธกเธฒเธŠเธดเธ</strong></span>&nbsp;&nbsp;&nbsp;</td>
                        <td align="left" bgcolor="#FF9966">&nbsp;
                          <input name="cust_name" type="text" id="cust_name" size="30" maxlength="100" value="<? echo $arr["cust_name"]; ?>" />
                          <strong><span class="alerttxt">*</span></strong></td>
                      </tr>
                      <tr>
                        <td height="25" align="right" bgcolor="#8c0000"><span class="whitetxt"><strong>เธซเธกเธฒเธขเน€เธฅเธ‚เน‚เธ—เธฃเธจเธฑเธžเธ—เนŒ</strong></span>&nbsp;&nbsp;&nbsp;</td>
                        <td align="left" bgcolor="#FF9966">&nbsp;
                          <input name="cust_tel" type="text" id="cust_tel" size="20" maxlength="20" value="<? echo $arr["cust_tel"]; ?>" /></td>
                      </tr>
                      <tr>
                        <td height="25" align="right" bgcolor="#8c0000"><span class="whitetxt"><strong>เธฃเธซเธฑเธชเธœเธนเน‰เนเธ™เธฐเธ™เธณ</strong></span>&nbsp;&nbsp;&nbsp;</td>
                        <td align="left" bgcolor="#FF9966">&nbsp;
                          <input name="upline_code" type="text" id="upline_code" size="20" maxlength="10" value="<? echo $arr["upline_code"]; ?>" />
                          <strong><span class="alerttxt">*</span></strong>&nbsp;<img src="images/zoom.png" width="20" height="20" alt="เธ„เน‰เธ™เธซเธฒ" /></td>
                      </tr>
                      <tr>
                        <td height="25" align="right" bgcolor="#8c0000"><strong><span class="whitetxt">เธŠเธทเนˆเธญ-เธชเธเธธเธฅ&nbsp;</span></strong><span class="whitetxt"></span>&nbsp;&nbsp;</td>
                        <td align="left" bgcolor="#FF9966">&nbsp;
                          <input name="upline_name" type="text" id="upline_name" size="30" maxlength="100" value="<? echo $arr["upline_name"]; ?>" />
                          <strong><span class="alerttxt">*</span></strong></td>
                      </tr>
                      <tr>
                        <td height="25" align="right" bgcolor="#8c0000"><strong><span class="whitetxt">เธซเธกเธฒเธขเน€เธฅเธ‚เน‚เธ—เธฃเธจเธฑเธžเธ—เนŒ&nbsp;</span></strong><span class="whitetxt"></span>&nbsp;&nbsp;</td>
                        <td align="left" bgcolor="#FF9966">&nbsp;
                          <input name="upline_tel" type="text" id="upline_tel" size="20" maxlength="20" value="<? echo $arr["upline_tel"]; ?>" /></td>
                      </tr>
                      <tr>
                        <td width="140" align="right" bgcolor="#8c0000">&nbsp;</td>
                        <td width="300" align="left" bgcolor="#FF9966"><span class="alerttxt">&nbsp;&nbsp;<strong>* เธเธฃเธญเธเธ‚เน‰เธญเธกเธนเธฅเนƒเธซเน‰เธ„เธฃเธš<br />
                        </strong></span></td>
                      </tr>
                    </table></td>
                  </tr>
                  <tr>
                    <td align="center"><label>
                      <input type="hidden" name="id" id="id" value="<? echo $arr["cust_id"]; ?>" />
                      <input name="sts2" type="hidden" id="sts2" value="ac" />
                      <input type="submit" name="button3" id="button3" value="เนเธเน‰เน„เธ‚เธ‚เน‰เธญเธกเธนเธฅ" />
                    </label>
                      <label>
                        <input type="reset" name="button3" id="button4" value="เธขเธเน€เธฅเธดเธ" />
                      </label></td>
                  </tr>
                </table>
                <?
					}
				  ?>
              </form></td>
            </tr>
            <tr>
              <td>&nbsp;</td>
            </tr>
          </table></td>
          <td width="2" bgcolor="8c0000"></td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td><? //include "footer.php"; ?></td>
  </tr>
</table>
</body>
</html>





check_data.php


Code (PHP)
<?
	session_start();

	include "function.php";
	include "connectDB.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=windows-874" />
<title>-:-  ระบบจัดการศูนย์Œ Trainning ARAGON 101 -:-</title>
<link href="css/templatemo_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<?
	$strTemp = trim($_POST["upline_code"]);

	$Result = select("tb_customer","WHERE cust_code = '".$strTemp."' ");
	$chk = num_record("tb_customer","WHERE cust_code = '".$strTemp."' ");
	
	$objResult = mysql_fetch_array($Result);

	if($chk != 0)
	{
		echo "<table width='446' border='0' cellspacing='2' cellpadding='0'>";
		echo "<tr>";
        echo "	<td height='25' width='136' align='right' bgcolor='#8c0000'><strong><span class='whitetxt'>ชื่อ-สกุล&nbsp;</span></strong><span class='whitetxt'></span>&nbsp;&nbsp;</td>";
		echo "	<td align='left' width='306' bgcolor='#FF9966'>&nbsp;<input name='upline_name' type='text' id='upline_name' size='30' maxlength='100' disabled='disabled' value='$objResult[cust_name]' /><strong><span class='alerttxt'>*</span></strong></td>";
		echo "</tr>";
        echo "<tr>";
        echo "	<td height='25' width='136' align='right' bgcolor='#8c0000'><strong><span class='whitetxt'>หมายเลขโทรศัพท์&nbsp;</span></strong><span class='whitetxt'></span>&nbsp;&nbsp;</td>";
        echo "	<td align='left' width='306' bgcolor='#FF9966'>&nbsp;<input name='upline_tel' type='text' id='upline_tel' size='20' maxlength='20' disabled='disabled' value='$objResult[cust_tel]' /></td>";
        echo "</tr>";
		echo "</table>";
	}
	else
	{
		echo "<table width='446' border='0' cellspacing='2' cellpadding='0'>";
		echo "<tr>";
        echo "	<td height='25' width='136' align='right' bgcolor='#8c0000'><strong><span class='whitetxt'>ชื่อ-สกุล&nbsp;</span></strong><span class='whitetxt'></span>&nbsp;&nbsp;</td>";
		echo "	<td align='left' width='306' bgcolor='#FF9966'><strong><span class='alerttxt'>&nbsp;ไม่พบข้อมูล</span></strong></td>";
		echo "</tr>";
        echo "<tr>";
        echo "	<td height='25' width='136' align='right' bgcolor='#8c0000'><strong><span class='whitetxt'>หมายเลขโทรศัพท์Œ&nbsp;</span></strong><span class='whitetxt'></span>&nbsp;&nbsp;</td>";
        echo "	<td align='left' width='306' bgcolor='#FF9966'><strong><span class='alerttxt'>&nbsp;ไม่พบข้อมูล</span></strong></td>";
        echo "</tr>";
		echo "</table>";
	}
?> 
</body>
</html>




ติดตรงที่แสดงผลมันเป็นภาษาต่างดาวครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2011-08-25 10:10:36 By : turesjung
 


 

No. 6

Guest


customer_exe.php

Code (PHP)
<?
	session_start();
	
	include "function.php";
	include "connectDB.php";
	
	if($_SESSION["login_true"] =="")
	{
		echo "<meta http-equiv='refresh' content='0;url=index.php'>";
		exit(0);
	}
?>
<!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>
<script language="JavaScript">
function checkVal1(x) 
{
	if (x.cust_code.value == "")
	{
		alert('กรุณากรอกรหัสสมาชิก');
		return false;
	}
	
	if (x.cust_name.value == "")
	{
		alert('กรุณากรอกชื่อ-สกุลสมาชิก');
		return false;
	}
	if (x.upline_code.value == "")
	{
		alert('กรุณากรอกรหัสผู้แนะนำ');
		return false;
	}
	
	if (x.upline_name.value == "")
	{
		alert('กรุณากรอกชื่อ-สกุลผู้แนะนำ');
		return false;
	}
}

var HttPRequest = false;

function doCallAjax()
{
	HttPRequest = false;
	if(window.XMLHttpRequest)
	{
		HttPRequest = new XMLHttpRequest();
		if(HttPRequest.overrideMimeType)
		{
			HttPRequest.overrideMimeType('text/html');
		}
	}else if(window.ActiveXObject)
	{
		try
		{
			HttPRequest = new ActiveXObject("Msxml2.XMLHTTP");
		}catch(e)
		{
			try
			{
				HttPRequest = new ActiveXObject("Microsoft.XMLHTTP");
			}catch(e){}
		}
	} 
		  
	if(!HttPRequest)
	{
		alert('Cannot create XMLHTTP instance');
		return false;
	}
	
	var url = 'check_data.php';
	var pmeters = "upline_code=" + encodeURI( document.getElementById("upline_code").value);

	HttPRequest.open('POST',url,true);

	HttPRequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	HttPRequest.setRequestHeader("Content-length", pmeters.length);
	HttPRequest.setRequestHeader("Connection", "close");
	HttPRequest.send(pmeters);
			
	HttPRequest.onreadystatechange = function()
	{

		if(HttPRequest.readyState == 3) 
		{
			document.getElementById("mySpan").innerHTML = "..";
		}
	
		if(HttPRequest.readyState == 4)
		{
			if(HttPRequest.responseText == 'Y')
			{
				window.location = 'AjaxPHPRegister3.php';
			}
			else
			{
				document.getElementById("mySpan").innerHTML = HttPRequest.responseText;
			}
		}
	}
 }
</script>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
<title>-:- ระบบจัดการศูนย์Œ Trainning ARAGON 101 -:-</title>
<link href="css/templatemo_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table width="990" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><? //include "header.php"; ?></td>
  </tr>
  <tr>
    <td valign="top">
    <table width="900" height="500" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="2" bgcolor="8c0000"></td>
          <td width="896" align="center" valign="top"><table width="650" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td height="50">&nbsp;</td>
            </tr>
            <tr>
              <td align="center"><form id="form_addproduct" name="form_addproduct" method="post" action="execute.php" onsubmit="return checkVal1(document.form_addproduct);">
                <?
                	if($s == 0)
					{
				?>
                <table width="450" border="1" bordercolor="#666666" cellspacing="0" cellpadding="0">
                  <tr>
                    <td><table width="446" border="0" cellspacing="2" cellpadding="0">
                      <tr>
                        <td height="25" align="right" bgcolor="#8c0000"><span class="whitetxt"><strong>รหัสสมาชิก</strong></span>&nbsp;&nbsp;&nbsp;</td>
                        <td align="left" bgcolor="#FF9966">&nbsp;
<input name="cust_code" type="text" id="cust_code" size="20" maxlength="10" />                          
<strong><span class="alerttxt">*</span></strong></td>
                      </tr>
                      <tr>
                        <td height="25" align="right" bgcolor="#8c0000"><span class="whitetxt"><strong>ชื่อ-สกุล</strong></span>&nbsp;&nbsp;&nbsp;</td>
                        <td align="left" bgcolor="#FF9966">&nbsp;
                          <input name="cust_name" type="text" id="cust_name" size="30" maxlength="100" />                          <strong><span class="alerttxt">*</span></strong></td>
                      </tr>
                      <tr>
                        <td height="25" align="right" bgcolor="#8c0000"><span class="whitetxt"><strong>หมายเลขโทรศัพท์</strong></span>&nbsp;&nbsp;&nbsp;</td>
                        <td align="left" bgcolor="#FF9966">&nbsp;
                          <input name="cust_tel" type="text" id="cust_tel" size="20" maxlength="20" /></td>
                      </tr>
                      <tr>
                        <td height="25" align="right" bgcolor="#8c0000"><span class="whitetxt"><strong>รหัสผู้แนะนำ</strong></span>&nbsp;&nbsp;&nbsp;</td>
                        <td align="left" valign="middle" bgcolor="#FF9966">&nbsp;
                          <input name="upline_code" type="text" id="upline_code" size="20" maxlength="10" />                          <strong><span class="alerttxt">*</span></strong>&nbsp;&nbsp;<img src="images/zoom.png" alt="เธ„เน‰เธ™เธซเธฒ" width="20" height="20" align="absmiddle" border="0" onclick="JavaScript:doCallAjax();" onmouseover="this.style.cursor='hand'" /></td>
                      </tr>                      
                    </table>
                    <span id="mySpan"></span>  
                    </td>
                  </tr>
                  <tr>
                    <td align="center"><label>
                      <input name="sts" type="hidden" id="sts" value="ac" />
                      <input type="submit" name="button" id="button" value="เพิ่มข้อมูล" />
                    </label>
                      <label>
                        <input type="reset" name="button2" id="button2" value="ยกเลิก" />
                      </label></td>
                  </tr>
                </table>
                <?
					}else if($s == 1){
						
						$result_product = select("tb_product","where product_id = '$id' ");
						
						$arr = mysql_fetch_array($result_product);					
				  ?>
                <table width="450" border="1" bordercolor="#666666" cellspacing="0" cellpadding="0">
                  <tr>
                    <td><table width="446" border="0" cellspacing="2" cellpadding="0">
                      <tr>
                        <td height="25" align="right" bgcolor="#8c0000"><span class="whitetxt"><strong>เธฃเธซเธฑเธชเธชเธกเธฒเธŠเธดเธ</strong></span>&nbsp;&nbsp;&nbsp;</td>
                        <td align="left" bgcolor="#FF9966">&nbsp;
                          <input name="cust_code" type="text" id="cust_code" size="20" maxlength="10" value="<? echo $arr["cust_code"]; ?>" />
                          <strong><span class="alerttxt">*</span></strong></td>
                      </tr>
                      <tr>
                        <td height="25" align="right" bgcolor="#8c0000"><span class="whitetxt"><strong>เธŠเธทเนˆเธญเธชเธกเธฒเธŠเธดเธ</strong></span>&nbsp;&nbsp;&nbsp;</td>
                        <td align="left" bgcolor="#FF9966">&nbsp;
                          <input name="cust_name" type="text" id="cust_name" size="30" maxlength="100" value="<? echo $arr["cust_name"]; ?>" />
                          <strong><span class="alerttxt">*</span></strong></td>
                      </tr>
                      <tr>
                        <td height="25" align="right" bgcolor="#8c0000"><span class="whitetxt"><strong>เธซเธกเธฒเธขเน€เธฅเธ‚เน‚เธ—เธฃเธจเธฑเธžเธ—เนŒ</strong></span>&nbsp;&nbsp;&nbsp;</td>
                        <td align="left" bgcolor="#FF9966">&nbsp;
                          <input name="cust_tel" type="text" id="cust_tel" size="20" maxlength="20" value="<? echo $arr["cust_tel"]; ?>" /></td>
                      </tr>
                      <tr>
                        <td height="25" align="right" bgcolor="#8c0000"><span class="whitetxt"><strong>เธฃเธซเธฑเธชเธœเธนเน‰เนเธ™เธฐเธ™เธณ</strong></span>&nbsp;&nbsp;&nbsp;</td>
                        <td align="left" bgcolor="#FF9966">&nbsp;
                          <input name="upline_code" type="text" id="upline_code" size="20" maxlength="10" value="<? echo $arr["upline_code"]; ?>" />
                          <strong><span class="alerttxt">*</span></strong>&nbsp;<img src="images/zoom.png" width="20" height="20" alt="เธ„เน‰เธ™เธซเธฒ" /></td>
                      </tr>
                      <tr>
                        <td height="25" align="right" bgcolor="#8c0000"><strong><span class="whitetxt">เธŠเธทเนˆเธญ-เธชเธเธธเธฅ&nbsp;</span></strong><span class="whitetxt"></span>&nbsp;&nbsp;</td>
                        <td align="left" bgcolor="#FF9966">&nbsp;
                          <input name="upline_name" type="text" id="upline_name" size="30" maxlength="100" value="<? echo $arr["upline_name"]; ?>" />
                          <strong><span class="alerttxt">*</span></strong></td>
                      </tr>
                      <tr>
                        <td height="25" align="right" bgcolor="#8c0000"><strong><span class="whitetxt">เธซเธกเธฒเธขเน€เธฅเธ‚เน‚เธ—เธฃเธจเธฑเธžเธ—เนŒ&nbsp;</span></strong><span class="whitetxt"></span>&nbsp;&nbsp;</td>
                        <td align="left" bgcolor="#FF9966">&nbsp;
                          <input name="upline_tel" type="text" id="upline_tel" size="20" maxlength="20" value="<? echo $arr["upline_tel"]; ?>" /></td>
                      </tr>
                      <tr>
                        <td width="140" align="right" bgcolor="#8c0000">&nbsp;</td>
                        <td width="300" align="left" bgcolor="#FF9966"><span class="alerttxt">&nbsp;&nbsp;<strong>* เธเธฃเธญเธเธ‚เน‰เธญเธกเธนเธฅเนƒเธซเน‰เธ„เธฃเธš<br />
                        </strong></span></td>
                      </tr>
                    </table></td>
                  </tr>
                  <tr>
                    <td align="center"><label>
                      <input type="hidden" name="id" id="id" value="<? echo $arr["cust_id"]; ?>" />
                      <input name="sts2" type="hidden" id="sts2" value="ac" />
                      <input type="submit" name="button3" id="button3" value="เนเธเน‰เน„เธ‚เธ‚เน‰เธญเธกเธนเธฅ" />
                    </label>
                      <label>
                        <input type="reset" name="button3" id="button4" value="เธขเธเน€เธฅเธดเธ" />
                      </label></td>
                  </tr>
                </table>
                <?
					}
				  ?>
              </form></td>
            </tr>
            <tr>
              <td>&nbsp;</td>
            </tr>
          </table></td>
          <td width="2" bgcolor="8c0000"></td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td><? //include "footer.php"; ?></td>
  </tr>
</table>
</body>
</html>



check_data.php

Code (PHP)
<?
	session_start();

	include "function.php";
	include "connectDB.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=windows-874" />
<title>-:-  ระบบจัดการศูนย์Œ Trainning ARAGON 101 -:-</title>
<link href="css/templatemo_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<?
	$strTemp = trim($_POST["upline_code"]);

	$Result = select("tb_customer","WHERE cust_code = '".$strTemp."' ");
	$chk = num_record("tb_customer","WHERE cust_code = '".$strTemp."' ");
	
	$objResult = mysql_fetch_array($Result);

	if($chk != 0)
	{
		echo "<table width='446' border='0' cellspacing='2' cellpadding='0'>";
		echo "<tr>";
        echo "	<td height='25' width='136' align='right' bgcolor='#8c0000'><strong><span class='whitetxt'>ชื่อ-สกุล&nbsp;</span></strong><span class='whitetxt'></span>&nbsp;&nbsp;</td>";
		echo "	<td align='left' width='306' bgcolor='#FF9966'>&nbsp;<input name='upline_name' type='text' id='upline_name' size='30' maxlength='100' disabled='disabled' value='$objResult[cust_name]' /><strong><span class='alerttxt'>*</span></strong></td>";
		echo "</tr>";
        echo "<tr>";
        echo "	<td height='25' width='136' align='right' bgcolor='#8c0000'><strong><span class='whitetxt'>หมายเลขโทรศัพท์&nbsp;</span></strong><span class='whitetxt'></span>&nbsp;&nbsp;</td>";
        echo "	<td align='left' width='306' bgcolor='#FF9966'>&nbsp;<input name='upline_tel' type='text' id='upline_tel' size='20' maxlength='20' disabled='disabled' value='$objResult[cust_tel]' /></td>";
        echo "</tr>";
		echo "</table>";
	}
	else
	{
		echo "<table width='446' border='0' cellspacing='2' cellpadding='0'>";
		echo "<tr>";
        echo "	<td height='25' width='136' align='right' bgcolor='#8c0000'><strong><span class='whitetxt'>ชื่อ-สกุล&nbsp;</span></strong><span class='whitetxt'></span>&nbsp;&nbsp;</td>";
		echo "	<td align='left' width='306' bgcolor='#FF9966'><strong><span class='alerttxt'>&nbsp;ไม่พบข้อมูล</span></strong></td>";
		echo "</tr>";
        echo "<tr>";
        echo "	<td height='25' width='136' align='right' bgcolor='#8c0000'><strong><span class='whitetxt'>หมายเลขโทรศัพท์Œ&nbsp;</span></strong><span class='whitetxt'></span>&nbsp;&nbsp;</td>";
        echo "	<td align='left' width='306' bgcolor='#FF9966'><strong><span class='alerttxt'>&nbsp;ไม่พบข้อมูล</span></strong></td>";
        echo "</tr>";
		echo "</table>";
	}
?> 
</body>
</html>

แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2011-08-25 10:13:10 By : turesjung
 


 

No. 7



โพสกระทู้ ( 1,095 )
บทความ ( 0 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์


ลอง เปลี่ยนที่ ไฟล์

check_data.php


Code (PHP)
<?
	session_start();

	include "function.php";
	include "connectDB.php";
?>
<?
	$strTemp = trim($_POST["upline_code"]);

	$Result = select("tb_customer","WHERE cust_code = '".$strTemp."' ");
	$chk = num_record("tb_customer","WHERE cust_code = '".$strTemp."' ");
	
	$objResult = mysql_fetch_array($Result);

	if($chk != 0)
	{
		echo "<table width='446' border='0' cellspacing='2' cellpadding='0'>";
		echo "<tr>";
        echo "	<td height='25' width='136' align='right' bgcolor='#8c0000'><strong><span class='whitetxt'>ชื่อ-สกุล&nbsp;</span></strong><span class='whitetxt'></span>&nbsp;&nbsp;</td>";
		echo "	<td align='left' width='306' bgcolor='#FF9966'>&nbsp;<input name='upline_name' type='text' id='upline_name' size='30' maxlength='100' disabled='disabled' value='$objResult[cust_name]' /><strong><span class='alerttxt'>*</span></strong></td>";
		echo "</tr>";
        echo "<tr>";
        echo "	<td height='25' width='136' align='right' bgcolor='#8c0000'><strong><span class='whitetxt'>หมายเลขโทรศัพท์&nbsp;</span></strong><span class='whitetxt'></span>&nbsp;&nbsp;</td>";
        echo "	<td align='left' width='306' bgcolor='#FF9966'>&nbsp;<input name='upline_tel' type='text' id='upline_tel' size='20' maxlength='20' disabled='disabled' value='$objResult[cust_tel]' /></td>";
        echo "</tr>";
		echo "</table>";
	}
	else
	{
		echo "<table width='446' border='0' cellspacing='2' cellpadding='0'>";
		echo "<tr>";
        echo "	<td height='25' width='136' align='right' bgcolor='#8c0000'><strong><span class='whitetxt'>ชื่อ-สกุล&nbsp;</span></strong><span class='whitetxt'></span>&nbsp;&nbsp;</td>";
		echo "	<td align='left' width='306' bgcolor='#FF9966'><strong><span class='alerttxt'>&nbsp;ไม่พบข้อมูล</span></strong></td>";
		echo "</tr>";
        echo "<tr>";
        echo "	<td height='25' width='136' align='right' bgcolor='#8c0000'><strong><span class='whitetxt'>หมายเลขโทรศัพท์Œ&nbsp;</span></strong><span class='whitetxt'></span>&nbsp;&nbsp;</td>";
        echo "	<td align='left' width='306' bgcolor='#FF9966'><strong><span class='alerttxt'>&nbsp;ไม่พบข้อมูล</span></strong></td>";
        echo "</tr>";
		echo "</table>";
	}
?> 

แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2011-08-25 11:28:19 By : ไวยวิทย์
 


 

No. 8

Guest


ลองแล้วครับก็เป็นภาษาต่างดาวอยู่ดี ค่าที่ส่งเข้า-ออกถูกต้องครับ แต่ติดตรงภาษาที่แสดงอย่างเดียวเลย
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2011-08-25 11:47:49 By : turesjung
 


 

No. 9



โพสกระทู้ ( 74,058 )
บทความ ( 838 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์
Twitter Facebook

Code (PHP)
header ('Content-type: text/html; charset=tis-620');


ลองดูครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2011-08-25 21:17:05 By : webmaster
 


 

No. 10



โพสกระทู้ ( 7 )
บทความ ( 0 )



สถานะออฟไลน์


ผมก็เคยเป็น

ก็ทำแบบ คห.3 ถ้าเดาถูก ไฟล์ แสดงผล client เป็น tis-620 หรือ windows-874 ส่วน

ไฟล์แสดงผล sv ไม่ได้ระบุ(มั้ง แต่ผมก็ไม่ได้เซตอะไรนะ เป็น php เพียวๆ)

ว่ากันที่ไฟล์ sv (client ช่างมัน ปล่อยมัน) เมื่อ ajax client ส่งค่ามาให้ไฟล์ sv มันจะเป็น utf-8 (รายละเอียดรอผู้รู้นะว่าทำไม)

เราก็ทำการแปลงด้วยฟังชัน ของ php ดัง คห.3 แนะนำ(ส่วนรายละเอียดของฟังชัน หาอ่านเอานะ) ก็คือแปลงจาก utf-8 เป็น tis win อะไรที่ต้อง

การสำหรับลงฐานข้อมูลหรือไม่ลงก็ว่ากันไป

ทีนี้คือตัวที่จะไปแสดงผลยังไฟล์ client ละทีนี้ เราก็แปลงมันกลับซะ ด้วย ฟังชันเดิมนั่นแหละ จาก tis win ให้เป็น utf ซะ

เท่านี้มันก็จะไม่ต่างด้าวกันอีกต่อไป

ปล.วิธีที่ผมใช้นะ ถ้ามีวิธีดีกว่านี้ บอกกันด้วย
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2011-11-04 15:19:18 By : diawcpe
 


 

No. 11



โพสกระทู้ ( 8 )
บทความ ( 0 )



สถานะออฟไลน์


header ('Content-type: text/html; charset=tis-620');

ได้ผลเลยครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2012-01-07 18:47:03 By : panoo
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : อยากใช้ tis-620 กับ ajax ทำไงครับ โดยไม่ต้องแก้เป็น utf-8
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)







Exchange: นำเข้าสินค้าจากจีน, Taobao, เฟอร์นิเจอร์, ของพรีเมี่ยม, ร่ม, ปากกา, power bank, แฟลชไดร์ฟ, กระบอกน้ำ

Load balance : Server 05
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่