My site has the login forms, the registration form and the "Recover my password" side by side, I want to connect the registration form with my database, the login I already have, but the registration I still can not, I want to make a registration form using jQuery and Ajax , can someone help me connect?
The name of my database is klp
and the name of my table is table
<section class="containerreg">
<h1><font color="#fb6e14">Sign Up</font></h1>
<p id="cadastra"> </p>
<form id="cadastra_user" method="POST" action="">
<p><input type="text" name="name" value="" placeholder="Complet name"></p>
<p><input type="text" name="user" value="" placeholder="Username"></p>
<p><input type="text" name="email" value="" placeholder="E-mail"></p>
<p><input type="password" name="senha" value="" placeholder="Password"></p>
<button type="submit" value="Enviar" class="btn btn-primary" />Sign Up</button>
</form>
</section>
<script type="text/javascript">
$(function(){
$('#cadastra_user').submit(function(event){
event.preventDefault();
var formDados new FormData($(this)[0]);
$.ajax({
url:'http://127.0.0.1/projects/foodee/addUsuario.php',
type:'POST',
data:formDados,
cache:false,
contentType:false,
processData:false,
success: function(data){
$('#cadastra').html(data);
alert('Cadastrado com sucesso!');
},
dataType: 'html'
});
return false;
});
});
</script>
This was the login page for the record that was sampled in the video, but it does not seem to work
Isthereanythingmissinginthevideo?SomeonehelpmeandpleasebecauseI'mnotsurewhattodotomakeitwork link
Type, agr until it is appearing that was registered (image 1), but nothing appears in my bd (image 2) and the business is that I have the right connections in the bd, both registration and login (images 3 and 4) ... right now, I thank everyone who is helping me and trying to help me.