|
|
|
ทำยังไงให้ตัวหนังสือที่ insert เข้ามาไม่เป็นภาษาต่างดาว |
|
|
|
|
|
|
|
เหนื่อยใจ จะให้แก้ยังไงครับ มีแต่ภาพ
|
|
|
|
|
Date :
2015-11-23 12:16:08 |
By :
NewbiePHP |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ตอบความคิดเห็นที่ : 1 เขียนโดย : NewbiePHP เมื่อวันที่ 2015-11-23 12:16:08
รายละเอียดของการตอบ ::
แฮร่ ขอโทษคะลืมโค้ด
supplier_in.php
Code (PHP)
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Supplier</title>
<!-- =================================================================================================================== -->
<link rel="stylesheet" type="text/css" href="../scsticker/css/formstyle.css"/>
<link rel="stylesheet" href="../scsticker/css/buttons.css">
<script type="text/javascript" src="../buttons/js/buttons.js"></script>
<script src="../scsticker/js/jquery-1.10.1.min.js"></script>
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
<link href="../scsticker/css/customize-template.css" type="text/css" media="screen, projection" rel="stylesheet"/>
<link rel="stylesheet" href="assets/css/styles.css"/>
<link rel="stylesheet" href="../scsticker/css/fonts_googleapis.css"/>
<!-- =================================================================================================================== -->
<link rel="stylesheet" href="../scsticker/css/styles3.css">
<script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
<script src="../scsticker/css/script3.js"></script>
<!-- ======================================== -->
<style type="text/css">
body {background-color:#97afa5}
h1 {background-color: #00ff00}
h2 {background-color: transparent}
/*p {background-color: rgb(250,0,255)}
*/</style>
</head>
<body>
<h4>
<!-- ============================================================================================================= -->
<!-- connect -->
<?php
include("connect.php");
$db = "scsticker";
$result = mysql_select_db($db);
if(!$result){
die('Could not find database called supplier: '. mysql_error());
}
$sup_id = $_POST["sup_id"];
$sup_name = $_POST["sup_address"];
$sup_address = $_POST["sup_address"];
$agen_name = $_POST["agen_name"];
$sup_tel = $_POST["sup_tel"];
$sup_fax= $_POST["sup_fax"];
$sup_email= $_POST["sup_email"];
$test_id = "select sup_id from supplier where sup_id ='".$sup_id."'";
$tmp = mysql_query($test_id);
$rows = mysql_num_rows($tmp);
if($rows > 0){
echo "<br/>";
echo "<br/>";
echo "<section class='page container'>";
echo "<div class='row'>";
echo "<div class='span16'>";
echo "<div class='box'>";
echo "<a href='index.php' class='button button-rounded button-flat'>หน้าหลัก</a>";
echo "<a href='supplier.php' class='button button-rounded button-flat'>ข้อมูลบริษัทตัวแทนจำหน่าย</a>";
echo "<div class='box-header'>";
echo "<i class='icon-bookmark' align='left'></i>";
echo "<h5>เพิ่มข้อมูลบริษัทตัวแทนจำหน่าย</h5>";
echo "</div><br/>";
echo "<div class='box-content'>";
echo "<center> <div class='btn-group-box'> ";
echo "<div class='col-lg-6'>";
echo "<h2></h2>";
echo "<div class='table-responsive'>";
echo "<center>";
echo "ไม่สามารถเพิ่มข้อมูลได้มีรหัสบริษัทตัวแทนจำหน่ายนี้อยู่ในระบบแล้ว<br><br>";
echo "<script>location='supplier_form_insert.php?id=$sup_id';</script>";
exit;
}else{
$sql = "insert into `scsticker`.`supplier` (`sup_id`, `sup_name`, `sup_address`, `agen_name`, `sup_tel`, `sup_fax`, `sup_email`)
values ('".$sup_id."', '".$sup_name."', '".$sup_address."', '".$agen_name."', '".$sup_tel."', '".$sup_fax."', '".$sup_email."')";
$result = mysql_query($sql);
if(!$result){
die('Insert not success !!!: '. mysql_error());
}
}
?>
</h4></center>
<script>
location="supplier.php";
</script>
</body>
</html>
|
|
|
|
|
Date :
2015-11-23 12:39:30 |
By :
POMP |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
เอาอันนี้ไปไว้ บนสุด
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
|
|
|
Date :
2015-11-23 23:19:01 |
By :
งานงอก |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 02
|