|
 |
|
java มันขึ้นเป็นภาษาต่างด้าวครับ ไม่ทราบว่าต้องแก้ยังไงครับผม |
|
 |
|
|
 |
 |
|
java มันขึ้นเป็นภาษาต่างด้าวครับ ไม่ทราบว่าต้องแก้ยังไงครับผม ผมลองใส่
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
บันทัดล่างสุดแล้วครับมันก็ยังเป็นภาษาต่างด้าวไม่ทราบว่าต้องแก้ยังไงครับผมนี่เป็นโค้ดครับ

<?php
session_start();
require("include/config.inc.php");
include "include/connect.php";
?>
<?php
$user_reg=$_POST[user_reg];
$pass_reg=$_POST[pass_reg];
$name_reg=$_POST[name_reg];
$sex_reg=$_POST[sex_reg];
$email_reg=$_POST[email_reg];
$tel_reg=$_POST[tel_reg];
$fax_reg=$_POST[fax_reg];
$address_reg=$_POST[address_reg];
$provice_reg=$_POST[provice_reg];
$code=$_POST[code];
$date_reg = date("Y-m-d");
mysql_db_query($dbname,"SET NAMES UTF8");
$sql="select * from tb_member where username='$user_reg' or email='$email_reg'";
$result=mysql_db_query($dbname,$sql);
$num=mysql_num_rows($result);
if($num>0) {
echo "<script language=javascript>alert('ชื่อสมาชิก หรือ อีเมลนี้มีคนใช้แล้ว กรุณาใช้ชื่อสมาชิก หรือ อีเมลอื่น');</script>";
echo "<script>window.location=\"register.php\"</script>";
exit();
}
if ($code != ($_SESSION['ses_code']) ) {
echo "<script language=javascript>alert('รหัสในรูปใส่ไม่ตรงกัน');</script>";
echo "<script>window.location=\"register.php\"</script>";
exit();
}
$encpwd=md5($pass_reg);
$sql = "INSERT into tb_member (username, password, name, sex, email, telephone, fax, address, provice, reg_date, dtnow)
values ('$user_reg','$encpwd','$name_reg','$sex_reg','$email_reg','$tel_reg','$fax_reg','$address_reg','$provice_reg','$date_reg','$now')";
$result = mysql_db_query($dbname, $sql);
if (!$result) {
echo("Error in SQL ".mysql_error() );
} else {
setcookie($cook_nm,$username,time()+$cook_time);
setcookie($cook_pw,$encpwd,time()+$cook_time);
$subj="ตอบรับการสมัครสมาชิก";
$from = "[email protected]";
$msg = "เรียน คุณ $name_reg \n\n".
"ขอแจ้งให้ท่านทราบว่า การสมัครสมาชิกเรียบร้อยแล้ว\n\n".
"Username: $user_reg \nPassword: $pass_reg \n\n".
"ท่านสามารถ Login เข้าแก้ไขค่าต่างๆได้ที่ http://www.textiledesign26.com/advice \n\n".
"ขอบพระคุณ ที่ใช้บริการ\www.textiledesign26.com/advice";
mail($email_reg, $subj, $msg,"From: $from") ;
echo "<script language=javascript>alert('การสมัครเรียบร้อยแล้วครับท่านสามารถเข้าสู่ระบบได้');</script>";
echo "<script>window.location=\"index.php\"</script>";
}
?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
Tag : - - - -

|
|
 |
 |
 |
 |
Date :
2010-04-09 17:04:59 |
By :
teekaiman |
View :
4649 |
Reply :
4 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ทำได้แล้วครับ พอดีผมลองเอาคำสั่ง <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> ไปวางที่ข้างล่างสุดของไฟล์ connect.php กลับได้เฉยเลยครับงงจริงๆครับ 
ขอบคุณทุกท่านที่เข้ามาตอบนะครับ 
|
 |
 |
 |
 |
Date :
2010-04-09 23:03:24 |
By :
teekaiman |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 00
|