-2
I’m having a problem, for some reason my script does not receive data from a form, however if I send the form to the same page, it gets.
Following form:
<form method="POST" action="/pjf/API/login.php" class="form-signin bg-white rounded border shadow p-5" id="formulario">
<div class="text-center mb-4">
<h1 class="h3 mb-3 font-weight-normal">BEM-VINDO</h1>
<p>Insira seus dados de login e senha corretamente.</p>
</div>
<div class="form-label-group">
<input type="text" id="inputEmail" name="login" class="form-control btn-circle" placeholder="Login" required autofocus>
<label for="inputEmail">Login</label>
</div>
<div class="form-label-group">
<input type="password" id="inputPassword" name="pass" class="form-control btn-circle" placeholder="Senha" required>
<label for="inputPassword">Senha</label>
</div>
<button class="btn btn-lg btn-outline-primary btn-block btn-circle" type="submit" name="submitt">ENTRAR</button>
<p class="mt-5 text-muted text-center">Login Teste - 2020</p>
</form>
Follows PHP code
<?php
echo $_POST['login'];
?>
I know the data is sent because if I take the action, the form page itself receives and shows the data.
As to the question, enter the directory structure.
– Augusto Vasques
The folder pjf would be the root directory. The form page is the following structure: 'pjf/log-in/auth/13350044395f1e6bc5ac5fb/l/0/'. The PHP receiver page is in the following structure: 'pjf/API/login.php'.
– Wan
Dude, there are too many variables left to come up with! But I suggest putting the full URL in the action: 'http://................ /API/login.php"
– Duda Gervásio