خرید بک لینک

Vote count: -2

I'm trying to get result from database using PHP OOP so I coded this example:

<?php 
    class Get{
        private $db;
        public $useame;
        public function __construct(){
            $this->db = new Coection();
            $this->db = $this->db->dbCoect();
            $inf = $this->db->prepare("select * from admins where useame = ".$_SESSION['admin_useame']."");
            $inf->execute();
            $inf->fetch();
        }
        public function get_name() {
            retu $this->useame;
        }
    }
    ?>

Then I wrote at the top of my page this:

    <?php 
require_once 'php/functions/sanitize.php';
$adm = new Admin();
 echo $adm->get_name();
?>

But the problem is it does not show anything ,I mean no error appears and no results at all! So what's going wrong with this code ?

asked 32 secs ago

برچسب: نویسنده: استخدام کار تاريخ: شنبه 19 تير 1395 ساعت: 20:16

صفحه بندی