dependency injection in oops in php part -16(hindi/urdu)

in this video tutorials i will tell you about dependency injection in oops in php hindi/urdu part-16

for sublime text shortcut technic download this file and see instruction:

For best and good quality hosting on hostinger at good price ,please click on this link

, , , , , ,

13 thoughts on “dependency injection in oops in php part -16(hindi/urdu)

  1. Fatal error: Uncaught Error: Call to a member function query() on null in C:xampphtdocsONLINE EXAMclassusers.php:19 Stack trace: #0 C:xampphtdocsONLINE EXAMsignup.php(14): users->signup(' insert into si…') #1 {main} thrown in C:xampphtdocsONLINE EXAMclassusers.php on line 19

    this is my user.php
    class users{
    public $host="localhost";
    public $username="root";
    public $pass="";
    public $dbname="college";
    public $conn;
    public function _construct()

    $this-> conn= new mysqli($this->$host,$this->$username,$this->$pass,$this->$dbname);
    if ($this->conn->connect_errno)
    die ("Database connection failed".$this->conn_connect_errno);
    public function signup($data)
    return true;



    this is my signup

    include ("class/users.php");
    $register= new users;
    extract ($_POST);
    $query=" insert into signup values ('','$name','$father','$mother','$email','$pwd','$img_name')";



    pls help me how i solve this

Leave a Reply

Your email address will not be published. Required fields are marked *