tianjia.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. $yqrid = $_POST['yqrid'];
  3. $name = $_POST['name'];
  4. $api_type = $_POST['api_type'];
  5. $productType = $_POST['productType'];
  6. $goodsCode = $_POST['goodsCode'];
  7. $sku = $_POST['sku'];
  8. $se_num = $_POST['se_num'];
  9. $downtel = $_POST['downtel'];
  10. $jieshao = $_POST['jieshao'];
  11. $yys = $_POST['yys'];
  12. $ltime = $_POST['ltime'];
  13. $zhutu = $_POST['zhutu'];
  14. $link = $_POST['link'];
  15. $price = $_POST['price'];
  16. $proxy_price = $_POST['proxy_price'];
  17. $notes = $_POST['notes'];
  18. $xuanhao = $_POST['xuanhao'];
  19. $baoyou = $_POST['baoyou'];
  20. $gsd = $_POST['gsd'];
  21. $other = $_POST['other'];
  22. $haokaid = ''; // 初始化$haokaid变量
  23. if ($api_type === 'yqrapi') {
  24. $haokaid = $yqrid;
  25. } elseif ($api_type === 'hnhklt') {
  26. $haokaid = $productType;
  27. }elseif ($api_type === 'haokeyun') {
  28. $haokaid = $goodsCode;
  29. }elseif ($api_type === 'gantanhao') {
  30. $haokaid = $suk;
  31. }
  32. include_once("../../untils/conn.php");
  33. if ($con) {
  34. mysqli_query($con, "set names utf8");
  35. $data = mysqli_query($con, "INSERT INTO list (haokaid, name, jieshao, zhutu, ltime, yys, link, price, proxy_price, notes, xuanhao, other, baoyou,gsd, api_type, se_num , downtel) VALUES ('$haokaid', '$name', '$jieshao', '$zhutu', '$ltime', '$yys', '$link', '$price', '$proxy_price', '$notes', '$xuanhao', '$other', '$baoyou','$gsd', '$api_type', '$se_num', '$downtel')");
  36. if ($data) {
  37. echo ("<script>alert('添加信息成功')</script>");
  38. echo ("<script>window.location.href='../list.php'</script>");
  39. } else {
  40. echo ("<script>alert('添加失败,请输入全部数据');history.back();</script>");
  41. // echo "Error updating record: " . $con->error;
  42. }
  43. }