tianjiaSort.php 532 B

123456789101112131415
  1. <?php
  2. $yys = $_POST['yys'];
  3. $yysabbr = $_POST['yysabbr'];
  4. $sortid = $_POST['sortid'];
  5. include_once("../../untils/conn.php");
  6. if ($con) {
  7. mysqli_query($con, "set names utf8");
  8. $data = mysqli_query($con, "insert into sort(yys,yysabbr,sortid) values('$yys','$yysabbr','$sortid')");
  9. if ($data) {
  10. echo ("<script>alert('添加信息成功')</script>");
  11. echo ("<script>window.location.href='../sort.php'</script>");
  12. } else {
  13. echo ("<script>alert('添加失败,请输入全部数据');history.back();</script>");
  14. }
  15. }