forked from hanlintao/translatorscanprogram
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path代码 5-15.php
More file actions
32 lines (28 loc) · 834 Bytes
/
代码 5-15.php
File metadata and controls
32 lines (28 loc) · 834 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
$zh_CN = $_POST["zh_CN"];
$en_US = $_POST["en_US"];
include "shared/conn.php";
$sql_en = "INSERT INTO termdata(en_US) VALUES('$en_US') ";
$sql_zh = "INSERT INTO termdata(zh_CN) VALUES('$zh_CN') ";
mysqli_select_db( $conn,"myterm" );
mysqli_query($conn,"set names 'utf8'");
$insert_en = mysqli_query( $conn, $sql_en );
$insert_zh = mysqli_query( $conn, $sql_zh );
if(!$insert_zh )
{
echo "无法插入中文数据: ".mysqli_error($conn);
}
else
{
echo "中文数据插入成功!"."<br>";
}
if(!$insert_en )
{
echo "无法插入英文数据: ".mysqli_error($conn);
}
else
{
echo "英文数据插入成功!"."<br>";
}
mysqli_close($conn);
?>