term_post.php 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. $respond=array("status"=>0,"message"=>"");
  3. if($_POST["id"]!=""){
  4. $query="UPDATE term SET meaning= ? ,other_meaning = ? , tag= ? ,channal = ? , language = ? , note = ? , receive_time= ?, modify_time= ? where guid= ? ";
  5. $stmt = @PDO_Execute($query,array($_POST["mean"],
  6. $_POST["mean2"],
  7. $_POST["tag"],
  8. $_POST["channal"],
  9. $_POST["language"],
  10. $_POST["note"],
  11. mTime(),
  12. mTime(),
  13. $_POST["id"]
  14. ));
  15. if (!$stmt || ($stmt && $stmt->errorCode() != 0)) {
  16. $error = PDO_ErrorInfo();
  17. $respond['status']=1;
  18. $respond['message']=$error[2].$query;
  19. }
  20. else{
  21. $respond['status']=0;
  22. $respond['message']=$word;
  23. }
  24. }
  25. else{
  26. }
  27. echo json_encode($respond, JSON_UNESCAPED_UNICODE);
  28. ?>