I'm trying to make a login page to learn basic PHP , first i want my seperate PHP file to store the input of the HTML file ( with a form ) , but when I press the button ( to trigger the POST to the PHP script ) I keep getting an unpleasing error.
Ive searched trough SO / internet , and i found similar people with my problem , but not the right solution for this problem ( atleast for my case ) Im pretty certain the problem has to do with structure / mapping , but I dont have a clue
my user login page :
<form action="VerkoperApi.php" method="post">
<p>Chose a username</p>
<input type="text" placeholder="Username" id="Username" name="Username">
<p>Choose a password</p>
<input type="password" placeholder="Password" id="Password" name="Password">
<p>Repeat password</p>
<input type="password" placeholder="Repeat Password" id="RepeatPassword" name="RepeatPassword">
<p id="ErrorMessage"></p>
<p>Please enter e-mail address</p>
<input type="email" placeholder="E-mail address" id="Email" name="Email">
<p></p>
<input type="submit" value="Submit" name="submit">
My Php file :
<?php
if(isset($_POST["submit"]))
{
$link = mysqli_connect("localhost" , "root" , "" , "MyDBName");
if ($link == false)
{
die("No connection")
}
else
{
$uname = $_POST['Username'];
$upass = $_POST['Password'];
$umail = $_POST['Email'];
}
?>
Im working in Framework 7 , and my .php file is in the same folder as my html page , so in my folder you will find : /Framework7-1.6.5/dist/index.html & /Framework7-1.6.5/dist/VerkoperApi.php
this is the error i'm getting : Cannot POST /Framework7-1.6.5/dist/VerkoperApi.php
If you need any more information , feel free to ask!