|
|
@@ -29,17 +29,19 @@ if (md5($all) != $_POST['key']) {
|
|
|
|
|
|
try {
|
|
|
$pdo = pdoConnect();
|
|
|
- $stmt = $pdo->prepare("insert into loveway_data(id,confessor,contact,time,to_who,introduction,content,image)values(?,?,?,?,?,?,?,?)");
|
|
|
+ $stmt = $pdo->prepare("insert into loveway_data(id,favorite,confessor,contact,time,to_who,introduction,content,image,comment)values(?,?,?,?,?,?,?,?,?,?)");
|
|
|
$stmt->bindValue(1, rand(100000000, 999999999));
|
|
|
- $stmt->bindValue(2, $confessor);
|
|
|
- $stmt->bindValue(3, $contact);
|
|
|
- $stmt->bindValue(4, date("Y-m-d H:i:s", time()));
|
|
|
- $stmt->bindValue(5, $ta);
|
|
|
- $stmt->bindValue(6, $introduction);
|
|
|
- $stmt->bindValue(7, $content);
|
|
|
- $stmt->bindValue(8, $image);
|
|
|
+ $stmt->bindValue(2, 0);
|
|
|
+ $stmt->bindValue(3, $confessor);
|
|
|
+ $stmt->bindValue(4, $contact);
|
|
|
+ $stmt->bindValue(5, date("Y-m-d H:i:s", time()));
|
|
|
+ $stmt->bindValue(6, $ta);
|
|
|
+ $stmt->bindValue(7, $introduction);
|
|
|
+ $stmt->bindValue(8, $content);
|
|
|
+ $stmt->bindValue(9, $image);
|
|
|
+ $stmt->bindValue(10, "[]");
|
|
|
if ($stmt->execute()) {
|
|
|
- exit('{"code":1,"msg":"success"}');
|
|
|
+ exit('{"code":1,"msg":"表白信息提交成功!"}');
|
|
|
} else {
|
|
|
exit('{"code":-2,"msg":"抱歉,出现了一个未知错误!请与管理员联系!"}');
|
|
|
}
|