Php Mysql Database query error
<p>Basically, from the form that I made I send <code>customer_name</code> and with this code I pull it and save it to the database along with the time. This code keeps giving me this error:</p>

<blockquote>
  <p>Fatal error: Using $this when not in object context in /home/projectu/public_html/sub/save.php on line 19</p>
</blockquote>

<p>Note: 19th line is this one:</p>

<pre><code>$db-&gt;query($queryone);
</code></pre>

<p>Here is my code:</p>

<p>Whole Save.php</p>

<pre><code>include('db-config.php');

$customer_name = $_POST['customername'];

/* Kaspersky */
$kaspersky_date = strtotime("+11 months").'|'.strtotime("+12 months");
$kaspersky = explode("|", $kaspersky_date);
$kaspersky_temp = "$customer_name got new kaspersky.";

/* PC Picked-UP */
$pickedups_date = strtotime("+1 months");
$pickedups_temp = "$customer_name picked up his computer.";


if(isset($_POST['kaspersky'])) {
$queryone = "INSERT INTO sublist (scheduled_date, customer_name, kaspersky_status, kaspersky_template)
                       VALUES ($kaspersky[0], $customer_name, YES, $kaspersky_temp)";

$this-&gt;query($queryone);

$querytwo = "INSERT INTO sublist (scheduled_date, customer_name, kaspersky_status, kaspersky_template)
                       VALUES ($kaspersky[1], $customer_name, YES, $kaspersky_temp)";

$this-&gt;query($querytwo);

}
if(isset($_POST['pickeduppc'])) {
$query = "INSERT INTO sublist (scheduled_date, customer_name, pcpickup_status, pcpickup_template)
                       VALUES ($pickedups_date, $customer_name, YES, $pickedups_temp)";
}
</code></pre>
