用于连接和设置没有像xampp这样的应用程序的用户数据库的代码

I cant figure out how to set up a php script to coincide with my html so that when a new user is made, it sends their info to the database. but with the way i have the login page setup, its all just html and css. Is there a way i could get the php script to send all the data in my forms to the mysql database? Below is all the html code /aside from the css, as it is very long/ I want to connect this whole thing together with php, mysql and apache. Ive already set them up and my html file is index.html

<body>
  <div class="header" id="myHeader">
    <h2 id="FromentFilms">Froment Films</h2>
    <button
      class="openbutton2"
      onclick="document.getElementById('ido12').style.display='block'"
    >
      signup
    </button>
    <div id="ido12" class="modal2">
      <div class="w3-modal-content w3-animate-top">
        <span
          onclick="document.getElementById('ido12').style.display='none'"
          class="close2"
          title="Close Modal"
          >&times;</span>
        <form class="modal-content2" action="index.php">
          <div class="container2">
            <h1>Sign Up</h1>
            <p>Please fill in this form to create an account.</p>
            <hr />
            <label for="email2"><b>Email</b></label>
            <input
              type="text"
              placeholder="Enter Email"
              name="email2"
              required
            />

            <label for="psw2"><b>Password</b></label>
            <input
              type="password"
              placeholder="Enter Password"
              name="psw2"
              required
            />

            <label for="psw-repeat2"><b>Repeat Password</b></label>
            <input
              type="password"
              placeholder="Repeat Password"
              name="psw-repeat2"
              required
            />

            <label>
              <input
                type="checkbox"
                checked="checked"
                name="remember2"
                style="margin-bottom:15px"
              />
              Remember me
            </label>

            <p>
              By creating an account you agree to our
              <a href="#" style="color:dodgerblue">Terms & Privacy</a>.
            </p>

            <div class="clearfix">
              <button
                type="button"
                onclick="document.getElementById('ido12').style.display='none'"
                class="cancelbtn2"
              >
                Cancel
              </button>
              <button type="submit" class="signupbtn">Sign Up</button>
            </div>
          </div>
        </form>
      </div>
    </div>

    <!-- Button to open the modal login form -->
    <button
      class="openbutton"
      onclick="document.getElementById('id01').style.display='block'"
    >
      Login
    </button>

    <!-- The Modal -->
    <div id="id01" class="modal" style="display: none;">
      <div class="w3-modal-content w3-animate-top">
        <span
          onclick="document.getElementById('id01').style.display='none'"
          class="close"
          title="Close Modal"
          >×</span
        >

        <!-- Modal Content -->
        <form action="Login.php" class="modal-content animate">
          <div class="imgcontainer">
            <img src="img_avatar2.png" class="avatar" height="42" width="42" />
          </div>

          <div class="container">
            <label for="uname"><b>Username</b></label>
            <input
              type="text"
              placeholder="Enter Username"
              name="uname"
              required=""
            />

            <label for="psw"><b>Password</b></label>
            <input
              type="password"
              placeholder="Enter Password"
              name="psw"
              required=""
            />

            <button type="submit">Login</button>
            <label>
              <input type="checkbox" checked="checked" name="remember" />
              Remember me
            </label>
          </div>

          <div class="container" style="background-color:#f1f1f1">
            <button
              type="button"
              onclick="document.getElementById('id01').style.display='none'"
              class="cancelbtn"
            >
              Cancel
            </button>
            <span class="psw">Forgot <a href="#">password?</a></span>
          </div>
        </form>
      </div>
    </div>
    <script>
      // Get the modal
      var modal = document.getElementById("id01");

      // When the user clicks anywhere outside of the modal, close it
      window.onclick = function(event) {
        if (event.target == modal) {
          modal.style.display = "none";
        }
      };
      // Get the modal
      var modal = document.getElementById("ido12");

      // When the user clicks anywhere outside of the modal, close it
      window.onclick = function(event) {
        if (event.target == modal) {
          modal.style.display = "none";
        }
      };
    </script>
  </div>
</body>

This is my form code. It pops up on a modal and i want the php to receive the user info and send it to the database for storing and retreiving.

I want to be able to run my mysql database in the terminal (ubuntu linux) and see the user info that has been submmited to the database and be able to retreive that when a user logs in to their account