title: PHP MySQL Insert not working without error
body: <p>i used this code and i didnt get any errors but when i check the phpadmin and my database its all empty no data added to the table what should i do ?
  where is the problem?</p>
  
  <p>i checked also my database and table values and my html names</p>
  
  <pre><code>&lt;?php
      if(isset( $_POST['submit'] ) )
      {                       
          $name = $_POST['p_name'];
          $price = $_POST['p_price'];
          $type = $_POST['p_type'];
          $des = $_POST['p_desc'];
          $img = 'images/is7.jpeg';
          //***********************
          require_once 'setting.php';
          $dbc = mysqli_connect($db_host, $db_user, $db_pass, $db_name);
          mysqli_set_charset($dbc, 'utf8');
          $query = "INSERT INTO products(name, price, type, des, img)
                          VALUES('$name', '$price', '$type', $des, '$img')";
          mysqli_query($dbc, $query);
          mysqli_close($dbc);
          header('Location: success.php');
          exit;
      }
  ?&gt;
  </code></pre>