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 > จะเปลี่ยนภาษาในไฟล์รับ-ส่งอีเมล์ตรงไหนคะ.........................



 

จะเปลี่ยนภาษาในไฟล์รับ-ส่งอีเมล์ตรงไหนคะ.........................

 



Topic : 133078



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



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



คือทำระบบสั่งสินค้าออนไลน์ค่ะ
ทำได้แล้ว เวลาสั่งสินค้าและคลิก submit
ข้อมูลจะถูกส่งไปที่อีเมล์ที่เรากำหนด
แต่ อยากจะเปลี่ยนหรือแก้ไขข้อความในตารางจากไทย เป็นอังกฤษ ต้องไปแก้ที่ไหนคะ หาไม่เจอค่ะ ไม่รู้จะฮะิบายยังไง
ขอบคุณค่ะ

เมล์



Tag : PHP, HTML, HTML5, Google Chrome







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2019-02-07 11:39:56 By : 2015381758558256 View : 705 Reply : 10
 

 

No. 1



โพสกระทู้ ( 5,105 )
บทความ ( 4 )

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

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


จะอธิบายอย่างไรดี กด submit ปุ๊บ ข้อมูลส่งมาอีเมลล์ปั๊บ
ก็ลองไล่ ๆ หาว่า หลังจาก submit มันวิ่งไปที่ไฟล์ไหน ตรง action ครับ






แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2019-02-07 12:04:52 By : apisitp
 


 

No. 2



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



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

ตอบความคิดเห็นที่ : 1 เขียนโดย : apisitp เมื่อวันที่ 2019-02-07 12:04:52
รายละเอียดของการตอบ ::
หนูก็งงๆ ว่าจะอธิบายยังไงดี เดี๋ยวจะหาโค้ดมาแปะให้ดูนะคะ

แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2019-02-07 12:09:47 By : 2015381758558256
 

 

No. 3



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



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

ตอบความคิดเห็นที่ : 1 เขียนโดย : apisitp เมื่อวันที่ 2019-02-07 12:04:52
รายละเอียดของการตอบ ::
... ใส่ความคิดเห็นตรงนี้.......


Code (PHP)
<?php
session_start();
include "function.php";
include "dbconfig.php";
include "config.php";
conndb();

function get_send_method_name($send_method_id)
{
    $query = "select * from send_method_tb where id = '$send_method_id'";
    $result= mysql_query($query);
    $row = mysql_fetch_array($result);
    return $row['method_name'];
}

function get_send_method_price($send_method_id)
{
    $query = "select * from send_method_tb where id = '$send_method_id'";
    $result= mysql_query($query);
    $row = mysql_fetch_array($result);
    return $row['method_price'];
}

$send_method_id = $_POST['send_method_id'];

$money_total = $_SESSION['total'] + get_send_method_price($send_method_id);
$fullname = $_POST['fullname'];
$tel = $_POST['tel'];
$email = $_POST['email'];
$address = $_POST['address'];
$remarks = $_POST['remarks'];
$order_datetime = date("Y-m-d H:i:s");

$member_id = $_POST['member_id'];


$insert1 = "insert into orders(order_id,order_status,update_qty_ok,money_total,member_id,fullname,tel,email,address,remarks,order_datetime) VALUES ('','รอการชำระเงิน','N','$money_total','$member_id','$fullname','$tel','$email','$address','$remarks','$order_datetime')";
$result1 = mysql_query($insert1);
$order_id = mysql_insert_id();


foreach ($_SESSION['SHOPPING_CART'] as $itemNumber => $item) {

         $qty = $item['qty'];
         $price = $item['price'];
         $product_name = $item['name'];
         $product_id = $item['product_id'];

         // ทำการเก็บรายการสินค้าที่สั่งซื้อเอาไว้ในตาราง orderdetails โดยใช้ order_id เป็น Foreign Key ในการจับคู่กับใบสั่งซื้อสินค้าในภายหลัง
         $insert2 = "insert into orderdetails(orderdetails_id,order_id,product_id,product_name,qty,price) VALUES ('','$order_id','$product_id','$product_name','$qty','$price')";
         $result2 = mysql_query($insert2);
}

         $send_method_price_tmp = get_send_method_price($send_method_id);
         $send_method_name_tmp = get_send_method_name($send_method_id);

         $insert3 = "insert into orderdetails(orderdetails_id,order_id,product_id,product_name,qty,price) VALUES ('','$order_id',-1,'$send_method_name_tmp','1','$send_method_price_tmp')";
         $result3 = mysql_query($insert3);


// เริ่มต้น Code การส่งเข้าอีเมล์

$mess .= $email_body."
<center><br><hr width=550>
<p><b><font size=5>Product invoice</font></b><br></p>


  <table width=550 border=1 cellpadding=0 cellspacing=0>
      <tr>
        <td colspan=4>
        <center>
<table width=100% cellpadding=0 cellspacing=0>
	<tr>

		<td width=50%>&nbsp;<b><font color=red>Order number : $order_id</font></b></td>
		<td width=50%>&nbsp;<b><font color=red>Order date / time : ".convert_datetime($order_datetime)."</font></b></font></b></td>
	</tr>

</table>
        </center>
        </td>
      </tr>
    
      <tr>
        <td width=235 bgcolor=#FFFFCC>
        <font color=#000080><center>Product Name</center></font></td>
        <td width=120 bgcolor=#FFFFCC>
        <font color=#000080><center>Price/Unit</center></font></td>
        <td width=55 bgcolor=#FFFFCC>
        <font color=#000080><center>Unit</center></font></td>
        <td width=140 bgcolor=#FFFFCC>
        <font color=#000080><center>Total</center></font></td>
      </tr>";

 
        foreach ($_SESSION['SHOPPING_CART'] as $itemNumber => $item) {
        

$mess .= "

        <tr>    
            <td width=235 bgcolor=#CCFFFF>&nbsp;".$item['name']."&nbsp;</td>
            <td width=120 bgcolor=#CCFFFF><div align=right>".number_format($item['price'],2,'.',',')."&nbsp;</div></td>
            <td width=55 bgcolor=#CCFFFF><div align=right>".number_format($item['qty'],0,'.',',')."&nbsp;</div></td>
            <td width=140 bgcolor=#CCFFFF><div align=right>".number_format($item['qty'] * $item['price'],2,'.',',')."&nbsp;</div></td>        
        </tr>

";


        }
        

$mess .= "

        <tr>    
            <td width=235 bgcolor=#CCFFFF>&nbsp;".$send_method_name_tmp."&nbsp;</td>
            <td width=120 bgcolor=#CCFFFF><div align=right>".number_format($send_method_price_tmp,2,'.',',')."&nbsp;</div></td>
            <td width=55 bgcolor=#CCFFFF><div align=right>".number_format(1,0,'.',',')."&nbsp;</div></td>
            <td width=140 bgcolor=#CCFFFF><div align=right>".number_format($send_method_price_tmp,2,'.',',')."&nbsp;</div></td>        
        </tr>

";



$mess .= "
        <tr id=itemtotal>    
            <td width=410 bgcolor=#FFFFCC colspan=3 valign=middle><div align=left>
            <b><font color=#008000>&nbsp;Total price</font></b></div></td>
            <td width=140 bgcolor=#FFFFCC valign=middle>
            <div align=right><b><font color=#008000>".number_format($_SESSION['total']+$send_method_price_tmp,2,'.',',')."&nbsp;baht&nbsp;</font></b></div></td>
        </tr>";


if($use_vat == 1)
{


$mess .= "
        <tr id=itemvat>    
            <td width=410 bgcolor=#FFFFCC colspan=3 valign=middle><div align=left>
            <b><font color=#008000>&nbsp;VAT (7%)</font></b></div></td>
            <td width=140 bgcolor=#FFFFCC valign=middle>
            <div align=right><b><font color=#008000>".number_format(0.07*($_SESSION['total']+$send_method_price_tmp),2,'.',',')."&nbsp;baht&nbsp;</font></b></div></td>
        </tr>";

$mess .= "
        <tr id=itemnettotal>    
            <td width=410 bgcolor=#FFFFCC colspan=3 valign=middle><div align=left>
            <b><font color=#008000>&nbsp;VAT included (7%)</font></b></div></td>
            <td width=140 bgcolor=#FFFFCC valign=middle>
            <div align=right><b><font color=#008000>".number_format($_SESSION['total']+$send_method_price_tmp + 0.07*($_SESSION['total']+$send_method_price_tmp),2,'.',',')."&nbsp;baht&nbsp;</font></b></div></td>
        </tr>";



}



$mess .= "

</table> 


<br>

<table width=500 border=0 cellspacing=5 cellpadding=0> 
<tr> 
<td width=30% class=bodytext>Name :</td> 
<td width=70%>$fullname</td> 
</tr> 
<tr> 
<td>Email :</td> 
<td>$email</td> 
</tr>
<tr> 
<td>Phone :</td> 
<td>$tel</td> 
</tr> 
<tr> 
<td valign=top>Adress :</td> 
<td>$address</td> 
</tr>
<tr> 
<td valign=top>Note :</td> 
<td>$remarks</td> 
</tr> 
</table> 

</center>
";

$mess = str_replace("#fullname#",$fullname,$mess);
$mess = str_replace("#web_tracking#",$web_url."/tracking.php",$mess);


$strFromName = $fullname;
$strFromEmail = $email;
$strTo = $admin_email;
$strSubject = "=?tis-620?B?".base64_encode($email_title)."?=";

//echo $mess; // ตัวแปร $mess เก็บข้อมูลที่ได้รับมาในรูปแบบ HTML และพร้อมส่ง


// เริ่มต้นส่วน Header ของอีเมล์ (ไม่ต้องแก้)
$header  = "MIME-Version: 1.0\n";
$header .= "Content-type: text/html; charset=tis-620\n"; // ถ้าเป็น text/plain คือไม่สามารถแสดง html ได้ และขึ้นบรรทัดใหม่ใช้ \n
$header .= "From: $strFromEmail\n";
$header .= "Return-Path: $strFromEmail\n";
$header .= "Reply-To: $strFromEmail\n";
$header .= "To: $strTo\n";
$header .= "Sent: ".date("jS F Y, g:i a")."\n";
$header .= "X-Mailer: PHP/".phpversion()."\n";
$header .= "X-Priority: 1\n";
$header .= "X-MSmail-Priority: High\n";

mail($strTo,$strSubject,$mess, $header);


?>

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=tis-620">
<title>Your Shopping Cart</title>

<STYLE type=text/css>
  A:link { color: #0000cc; text-decoration:none}
  A:visited {color: #0000cc; text-decoration: none}
  A:hover {color: red; text-decoration: none}
 </STYLE>
<style type="text/css">
<!--
small { font-family: Arial, Helvetica, sans-serif; font-size: 8pt; } 
input, textarea { font-family: Arial, Helvetica, sans-serif; font-size: 9pt; } 
b { font-family: Arial, Helvetica, sans-serif; font-size: 11pt; } 
big { font-family: Arial, Helvetica, sans-serif; font-size: 14pt; } 
strong { font-family: Arial, Helvetica, sans-serif; font-size: 11pt; font-weight : extra-bold; } 
font, td { font-family: Arial, Helvetica, sans-serif; font-size: 11pt; } 
BODY { font-size: 9pt; font-family: Arial, Helvetica, sans-serif; } 
-->
</style>

<script language="javascript">
var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
}
</script>
</head>

<body>
<center>
<div id="shoppingCartDisplay">

    <center><img src="images/shopping_cart_header.gif"></center>

<table border="0" cellpadding="2" cellspacing="0" width="750" style="border-collapse: collapse" bordercolor="#111111">

<tr bgcolor="#FFFFCC" height="40">
<td width="100%"><div align="center"><b>:: Order results ::</b></div>
</td>
</tr>

<tr bgcolor="#fbdbe8">
<td width="100%"><br>
<div align="center"><font color="green"><b>Success !! Your order information has been saved to the database.</b></font>
<br><br><a href="print.php?order_id=<?=$order_id; ?>" onclick="NewWindow(this.href,'print_order','800','500','yes');return false"><img src="images/printer.png" width="60" border="0"><br>Print your order</a>
<br><br>
</div>
</td>
</tr>

</table>

</div>
</center>

</body>
</html>

แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2019-02-07 13:05:13 By : 2015381758558256
 


 

No. 4



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



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

ตอบความคิดเห็นที่ : 3 เขียนโดย : 2015381758558256 เมื่อวันที่ 2019-02-07 13:05:13
รายละเอียดของการตอบ ::
... คลิก submit แล้วขึ้นหน้านี้ค่ะ .......

แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2019-02-07 13:06:04 By : 2015381758558256
 


 

No. 5



โพสกระทู้ ( 5,105 )
บทความ ( 4 )

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

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


ข้อมูลตาม code มันก็เป็นภาษาอังกฤษแล้วนี้ครับ แล้วยังไงต่อ พี่ก็งงครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2019-02-08 09:14:36 By : apisitp
 


 

No. 6



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



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

เวลารับข้อมูลทางอีเมล์ หัวข้อยังเป็นภาษาไทยอยู่เลยค่ะ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2019-02-12 14:06:56 By : 2015381758558256
 


 

No. 7



โพสกระทู้ ( 9,553 )
บทความ ( 2 )



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


หามาให้ได้ตัวแปรตัวนี้ มันถูกกำหนดจากไหนมา
$email_body

ปล. แล้วแน่ใจนะว่าแก้ถูกไฟล์ หลายคนตกม้าตาย เพราะแก้ผิดไฟล์ ทำไว้หลายก๊อปปี้เกิน (โดยเฉพาะคนตอบนี่แหล่ะ 5555)


ประวัติการแก้ไข
2019-02-12 15:29:44
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2019-02-12 15:25:36 By : Chaidhanan
 


 

No. 8



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



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

ตอบความคิดเห็นที่ : 7 เขียนโดย : Chaidhanan เมื่อวันที่ 2019-02-12 15:25:36
รายละเอียดของการตอบ ::
... เป็นอย่างที่ว่าจริงๆ ด้วยค่ะ "ตกม้าตาย" ทำไว้หลายก๊อปปี้ copy
ถึงว่าคุณพี่ Mr.กล้า บอกว่า มันก็เป็นภาษาอังกฤษแล้วนี่
แล้วท่าน Chaidhanan มาชี้จุดให้ว่า หา $email_body ให้เจอ

สรุป หนูแก้อีกไฟล์ แต่พออัพโหลด ดันไปอัพอีกไฟล์แทน 5555

ขอบคุณทุกๆ ท่านค่ะ

แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2019-02-13 10:00:58 By : 2015381758558256
 


 

No. 9



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



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


ใช้พวก git หรือ ide ที่มันมี version history (ส่วนใหญ่จะมีอยู่แล้ว) จะได้ไม่ต้องทำหลาย copy.
คือทำอันหนึ่ง ถ้าไม่พอใจจะเขียนใหม่ก็ comment ใน history ไว้ว่าอันนี้เราทำอย่างนี้ แล้วพอเขียนใหม่ก็ comment ไว้อีก เวลาไม่พอใจจะกลับไปกลับมาก็เอา history มา compare มันก็จะไม่มีปัญหาไฟล์หลาย copy ซ้ำซ้อน จำผิดๆถูกๆ.
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2019-02-13 10:38:29 By : mr.v
 


 

No. 10



โพสกระทู้ ( 9,553 )
บทความ ( 2 )



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


หลังจากเจอประสบการณ์ อัพผิดไฟล์ ผมก็เลิกใช้ copy
แต่ใช้ if else ช่วยใน code เลย จะใช้อันไหน ก็เปลี่ยน 0 เป็น 1
Code (PHP)
if(0){
  //test 1
}elseif(0){
  //test 2
}else{
  // org
}

พอ ได้เป็นที่พอใจก็ลบ อันที่ไม่ใช้ ออก

ส่วน history ยังไม่เคยใช้ ไว้จะลองใช้ดู ขอบคุณครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2019-02-13 14:09:35 By : Chaidhanan
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : จะเปลี่ยนภาษาในไฟล์รับ-ส่งอีเมล์ตรงไหนคะ.........................
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ 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 02
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 อัตราราคา คลิกที่นี่