GetPuid.php 559 B

1234567891011121314151617181920212223242526
  1. <?php
  2. session_start();
  3. include_once("../../../untils/conn.php");
  4. mysqli_query($con, "set names utf8");
  5. // 获取当前正在登录的账号信息的代理
  6. $proxy_acc = $_SESSION["account"];
  7. // 查询proxy表,找到符合条件的数据并输出给前端
  8. $sql = "SELECT * FROM proxy WHERE proxy_acc = '$proxy_acc'";
  9. $result = mysqli_query($con, $sql);
  10. if ($result) {
  11. $rows = mysqli_fetch_assoc($result);
  12. $id = $rows["proxy_id"];
  13. $proxy_info = array(
  14. "puid" => $id,
  15. );
  16. $json_data = json_encode($proxy_info);
  17. echo $json_data;
  18. }
  19. ?>