title: DB App with PHP & SQLite Returning Null in Database
body: <p>I'm currently building an ultra basic first name and last name database app to practice my skills with both PHP and SQLite and I have come into a bit of an issue that I can't figure out and I'm ready to pull my hair out over.</p>
  
  <p>I'll try and explain this as best I can, bit of a newbie.</p>
  
  <p>I'm using the Symfony HTTP-Foundation and polyfill-mbstring frameworks, the app is running error free and as expected apart from the issue of the input fields where I add the first name and last name don't seem to be writing to the database. When I view the data in the database, each row appears as NULL.</p>
  
  <p>Here is the function that I have created to add a new client to the database:</p>
  
  <pre><code>function addNewClient($firstName, $lastName) {
     global $db;
  
     try {
        $query = 'INSERT INTO client_summary (first_name, last_name) VALUES (:first_name, :last_name)';
  
        $stmt = $db-&gt;prepare($query);
  
        $stmt-&gt;bindParam(':first_name', $firstName);
        $stmt-&gt;bindParam(':last_name', $lastName);
  
        return $stmt-&gt;execute();
     } catch(\Exception $e) {
        throw $e;
     }
  }
  </code></pre>
  
  <p>Here's the code I am using for the input field</p>
  
  <pre><code>&lt;form method="post" action="procedures/add-client.php" class="mt-5"&gt;
     &lt;div class="form-group"&gt;
        &lt;label for="firstName"&gt;First Name&lt;/label&gt;
        &lt;input type="text" class="form-control" id="firstName" name="firstName" value="&lt;?php if(isset($firstName)) echo $firstName; ?&gt;" placeholder="First Name" required /&gt;
     &lt;/div&gt;
  
     &lt;div class="form-group"&gt;
        &lt;label for="lastName"&gt;Last Name&lt;/label&gt;
        &lt;input type="text" class="form-control" id="lastName" name="lastName" value="&lt;?php if(isset($lastName)) echo $lastName; ?&gt;" placeholder="Last Name" /&gt;
     &lt;/div&gt;
  
     &lt;button type="submit" class="btn btn-block btn-outline-primary"&gt;
        Insert Into Database
     &lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Then the procedure for adding a new client</p>
  
  <pre><code>&lt;?php
  require_once __DIR__ . '/../inc/bootstrap.php';
  
  $firstName = request()-&gt;get('first_name');
  $lastName = request()-&gt;get('last_name');
  
  try {
     $newClient = addNewClient($firstName, $lastName);
  
     redirect('/index.php');
     $response-&gt;send();
     exit;
  } catch(\Exception $e) {
     throw $e;
  }
  </code></pre>
  
  <p>The bootstrap.php is for the functions.php and connection.php files.</p>
  
  <p>Here is the results in the DB Browser I am using.</p>
  
  <p><a href="https://i.stack.imgur.com/UnZSS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UnZSS.png" alt="Screenshot of DB Browser and the results I am getting"></a></p>
  
  <p>Surely this is something I'm missing and just need a pair of experienced eyes.</p>
  
  <p>Thanking you in advance,</p>
  
  <p>Stu :)</p>