Update columns through SQL Query : <p>I have made a PHP script that upgrades his/her Firewall app (a function of my website). I have written this code:</p>

<pre><code>&lt;?php
session_start();
include_once 'dbconnect.php';
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "dbtest";

// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn-&gt;connect_error) {
die("Connection failed: " . $conn-&gt;connect_error);
} 

if(!isset($_SESSION['user']))
{
header("Location: index.php");
}
$query = "UPDATE users SET firewall = firewall + 1, money = money - 300 WHERE user_id=".$_SESSION['user']")";
?&gt;
</code></pre>

<p>Please help me and see what I did wrong.</p>
