title: Inserting data to sql database using stored procedure in PHP
body: <p>i am trying to use stored procedures to insert data into a sql database in php. I cant seem to get the data to enter into the database. i am new to php and stored procedures so dont know too much about them.</p>
  
  <p>I have a function called addemployee() where the stored procedure is being used</p>
  
  <pre><code>function addemployee($firstname, $lastname,$email,$username,$dateofbirth,$ppsn,$password, $admin)
  {
  $mysqli = new mysqli('localhost', 'root', '');
  
  $mysqli-&gt;query("CALL prc_emp_add(".$firstname.",".$lastname." , ".$email.", ".$username.", ".$dateofbirth.", ".$ppsn.", ".$password.", $admin)");
  echo 'GOT HERE';
  //mysqli_query($db, $query) or die(mysqli_error($db));
  }
  </code></pre>
  
  <p>Then in another file i am calling that function and passing through variables</p>
  
  <pre><code>addemployee($_POST['firstname'],$_POST['lastname'],$_POST['email'],$_POST['username'],$_POST['dateofbirth'],$_POST['ppsn'],$_POST['password'],$admin);
  </code></pre>
  
  <p>when i do a var_dump on my data in the function is has gotten passed through so i know the data is there and also the echo statement is working.
  Really need to know am i executing the call procedure correctly or what is going wrong</p>