I have tried almost 7 or 8 different code but my data is not inserting in database table.

    It's really hard to debug code without (a) seeing any code, and (b) knowing what errors you are getting (if any).

    Maybe try adding this to the start of your file to get some clues where things are broken?

    <?php
    ini_set('display_errors', true); // set to false in production
    error_reporting(E_ALL);
    
    // rest of code...
    
      Write a Reply...