<?php include("../app/models/connect.php"); $id_user = $_POST["id"]; $query = mysqli_query($connect,"SELECT * FROM Live WHERE estado = 1 "); $data = mysqli_fetch_array($query); echo $data["codigo"]; ?>