function getProperties($user_id) { $pr = new userProperties(); $conf = new connectionconf(); $this->conn = $conf->connect(); $path = ""; $sql = "select * from user_detay where user_id='" . $user_id . "'"; //echo $sql; $result = mysqli_query($this->conn, $sql); while ($row = mysqli_fetch_assoc($result)) { $pr->setUserid($row["user_id"]); $pr->setAd($row["ad"]); $pr->setSoyad($row["soyad"]); $pr->setEmail($row["email"]); $pr->setTelefon($row["telefon"]); $pr->setAvatar($row["avatar"]); } $sql = "select * from users where id='" . $user_id . "'"; $result = mysqli_query($this->conn, $sql); while ($row = mysqli_fetch_assoc($result)) { $pr->setUsername($row["username"]); } // mysqli_close($this->conn); return $pr; }
function __construct() { $conf = new connectionconf(); $this->conn = $conf->connect(); }