myslqli_query() wont INSERT data into my database
<p>hi there im having more php problems, trying to use mysqli_query. i have methods set up in a singleton database class call connect() and querydb(), querydb takes a $query parameter which im sure is fine as i used the query to add data to my table in myphpadmin. here is my php method for when i attempt to add data to the table in my register.php class.</p>

<pre><code>public function register() {

   $databaseinst = database:: getinstance();
   $conn =   $databaseinst-&gt;connect();

   $query = "INSERT INTO  Customer (email_address,firstname,lastname,address_line_1,address_line_2,city,postcode,country,password) VALUES ('$this-&gt;email','$this-&gt;firstname','$this-&gt;secondname','$this-&gt;address1','$this-&gt;address2','$this-&gt;city','$this-&gt;postcode','$this-&gt;country','$this-&gt;password1')";

   $numrows = $databaseinst-&gt;querydb($query);

       if ( false===$numrows ) {
    $this-&gt;errors[]= mysqli_error($conn);
    }


       if ($numrows &lt; 1) {
            $this-&gt;errors[] = "could not process query";
        }
        if($conn == 0)
        {
        $this-&gt;errors[] = "couldnt connect";
        }
        if($conn == 1)
        {
        $this-&gt;errors[] = " connected";
        }
    }

    public function showerrors() {
        echo "&lt;h3&gt; ERRORS!!&lt;/h3&gt;";
        echo "&lt;p&gt;" . var_dump($this-&gt;errors) . "&lt;/p&gt;";
        foreach ($this-&gt;errors as $key =&gt; $value)
        {
            echo $value . "&lt;/br&gt;";
        }
    }
</code></pre>

<p>the second method is just how i print out the errors when they occur.
next are the methods from my database singleton class which returns an instance fine i think the issue is with the mysqli_query() method call in my querydb() method just can figure out what it is i keep getting a "could not process query" reply. anyway here is the singleton class i used which is pretty much an edited version of one i found online.</p>

<pre><code>&lt;?php


class database {

private static $instance;
private $dbcon;
private $result;
private $numrows;


private function __construct()
{

}

  static function getinstance()
{
    if(!self::$instance)
    {
     self::$instance = new self();
    }

    return self::$instance;

 }

public function connect()
{
    $this-&gt;dbcon = mysqli_connect('localhost','********','****');
  if (!$this-&gt;dbcon)
  {
  return 0;
  }
  else
  {
  return 1;
  }

}

 public function querydb($query)
{

mysqli_select_db($this-&gt;dbcon,'theislan_testdatabase');

$this-&gt;result = mysqli_query($this-&gt;dbcon,$query);
$this-&gt;numrows = $this-&gt;result-&gt;num_rows;

   if ($this-&gt;numrows &lt; 1)
   {
      return 0;

   }
  else 
    {
        return 1;
    }
 }




}

?&gt;
</code></pre>

<p>any help is apreciated and   I apologise i just keep running in to problems with this stuff!</p>
