No link between php and db. Somebody help me. :/

              <head>
                  <meta charset="utf-8">
                  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
                  <title></title>
                  <meta name="description" content="">
                  <meta name="viewport" content="width=device-width, user-scalable=no">
                  <meta name="apple-mobile-web-app-capable" content="yes">
          
                  <link rel="stylesheet" href="css/normalize.css">
                  <link rel="stylesheet" href="css/main.css">
                  <link rel="stylesheet" href="css/popup.css">
          
                  <script src="js/libs/jquery.min.js"></script>
          
                  <script src="js/libs/zip.min.js"></script>
          
                  <!-- File Storage -->
                  <!-- <script src="js/libs/localforage.min.js"></script> -->
          
                  <!-- Full Screen -->
                  <script src="js/libs/screenfull.min.js"></script>
          
                  <!-- Render -->
                  <script src="js/epub.js"></script>
          
                  <!-- Reader -->
                  <script src="js/reader.js"></script>
          
                  <!-- Plugins -->
                  <!-- <script src="js/plugins/search.js"></script> -->
          
                  <!-- Highlights -->
                  <!-- <script src="js/libs/jquery.highlight.js"></script> -->
                  <!-- <script src="js/hooks/extensions/highlight.js"></script> -->
          
                  <style>
                  .header {
                    box-shadow: 3px 3px 3px 3px #dcdcdc;
                    margin-bottom: 50px;
                    height: 20px;
                    margin: 5px;
                    margin-bottom: 100px;
                    background: #cccccc;
          
                  }
                  .main{
                    width: 1000px;
                    height: 700px;
                    margin: 10px auto;
                    padding: 0px;
                    font-size: 20px;
                    text-align: center;
                    overflow: hidden;
                    text-overflow: ellipsis;
                    display: -webkit-box;
                    -webkit-box-orient: vertical;
                  }
                  </style>
          
          
              </head>
              <body>
          
                <div id="main">
          
                  <div id="titlebar">
          
                    <div class="header">
                      <div><?= $writer_title_name ?> </div>
                    </div>
          
                    <div class="main">
                        <?php
                        $userid = $_POST["id"];
                        $content = $_POST["content"];
                        $writer_title_name = $_POST["title_name"];
          
                        $con = mysqli_connect("localhost", "user1", "12345", "testdb");
                        mysqli_set_charset($con, 'utf8');
                        $sql = "select * from novelcontent where id='$userid' AND content='$content'";
                        $result = mysqli_query($con, $sql);
                        $total_record = mysqli_num_rows($result);
          
                        $row = mysqli_fetch_array($result);
          
                        ?>
                    </div>
                  </div>
                  </div>
          
                  <div id="divider"></div>
                  <div id="prev" class="arrow">‹</div>
                  <div id="viewer"></div>
                  <div id="next" class="arrow">›</div>
          
                  <div class="overlay"></div>
              </body> </html>

Hi, I’m a beginner who just started coding.
I’m developing a novel site.
I want to link php and db, but I don’t know.

You can put it in the viewer,doesn’t work.
the db field you’re using now is:

num, id, pass, title_name, round_name, content

I need to get the title_name, round_name, content.