当我试图将数据输入数据库时​​,不能POST /test.php给我这个错误

When I am trying to enter data into using php its give me an error Cannot POST /test.php please how I can solve it I am trying so much but it's not working please anyone can help me to solve this problem. It is my project work

this is my html code

<html>
<head>
<title>Login and Registration Form </title>
<link rel="stylesheet" href="style.css" >
</head>
    <body>
        <div class ="login-page">
          <div class ="form">


          <form class="login-form">
            <h1>Log In </h1>
              <input type="text" placeholder="Email id"/>
                <input type="password" placeholder="Password"/>
                <button type="submit">Log In </button>
               <p class="message">Not Registered?<a href="#"> Signup</a></p>

                </form>

          <form class="register-form" action="test.php" method="post">
              <h1>Sign up </h1>  
              <input type="text"  name="name" required placeholder="User Name"/>
                <input type="email"  name="email" required placeholder="Email id"/>
                <input type="password" name="password" required placeholder="Password"/>
                <button name="subject" type="submit" value="Register">Sign up</button>
                <p class="message">Already Registered?<a href="#">Login</a></p>

                </form>

            </div>
            </div>
    <script src='https://code.jquery.com/jquery-3.4.0.min.js'></script>
    <script>
        $('.message a').click(function(){$('form').animate({height:"toggle", opacity : "toggle"}, "slow");
        });
    </script>

    </body>

</html>    

this is my php code

<?php
 $name = $_POST['name'];
 $email =$_POST['email'];
 $password =  $_POST['password'];
$con = mysqli_connect('localhost','root','','registeration');
$query = "INSERT INTO `signup`(`name`, `email`, `password`) VALUES ('$name','$email','$password')";

$run=mysqli_query($con,$query);

if($run==TRUE)
    echo "Data Insert Successfully";
 else
     echo "Error !";

?>

This problem usually occurs when the PHP file you're trying to POST to isn't in the same directory as the HTML file.

If the PHP file is in a different directory you need to give the path to the file (either relative or absolute). For instance for a directory structure such as

root
  - html
    - index.html
  - php
    - test.php

your HTML form should point to "../php/test.php".

As an aside, your code is vulnerable to SQL Injection. Please look into using prepared statements using PDO.