1
Guys I’m starting now in php, I’ve touched a lot in java before but with php I’m having some doubts
This is my form.
<form name="sentMessage" action="controller">
<div class="row">
<div class="col-md-2"></div>
<div class="col-md-8">
<div class="form-group">
<input type="text" class="form-control" name="cpf" placeholder="CPF *" id="CPF" required data-validation-required-message="Favor informe o seu CPF.">
<p class="help-block text-danger"></p>
</div>
<div class="form-group">
<input type="password" class="form-control" name="senha" placeholder="Sua senha *" id="senha" required data-validation-required-message="Favor informe sua senha">
<p class="help-block text-danger"></p>
</div>
<div class="row">
<div class="col-xs-6 col-sm-6 col-md-6">
<input type="submit" class="btn btn-lg btn-primary btn-block" value="Entrar">
</div>
</div>
</div>
</div>
</form>
I wanted to know the correct way to pass the form data into the controller, I know that in java I would create a class that defined that the action would trigger this class and in the doPost method I would take the form information and make the appropriate validations and redirect it to the next page. Now there is the doubt in PHP. Could someone show an example of the right way to do this? Grateful