3
I need to send some information by POST to my controller, and at the same time pass a parameter in the URL. The Url Parameter I can take it easy, the problem is that the POST parameters will not.
I am using this function to generate a form and send with the information:
function paginacao(pagina,BASE_URL){
var url = BASE_URL+"acompanhamento/Aluno/"+pagina;
var hiddenForm = $("<form method='post' action='"+url+"'>"+
"<input type='text' id='campoParam' value='"+$('#campo').val()+"'>"+
"<input type='text' id='dataInicialAvaliacaoParam' value='"+$('#dataInicialAvaliacao').val()+"'>"+
"<input type='text' id='dataFinalAvaliacaoParam' value='"+$('#dataFinalAvaliacao').val()+"'>"+
"<input type='text' id='cursoAvaliacaoParam' value='"+$('#cursoAvaliacao').val()+"'>"+
"<input type='text' id='paginaParam' value='"+$('#pagina').val()+"'>"+
"<input type='submit' id='btnSubmitParam' value='"+$('#pagina').val()+"'>"+
"</form>");
$('body').append(hiddenForm);
$('#btnSubmitParam').click();
//hiddenForm.submit();
}
I have already checked the variables within the values and they bring the expected value. But when I try to give a var_dump($_POST).
on the controller, I get Empty
The variable pagina
that goes in the URL(second line) is the parameter that goes in get, the method is POST as it should, but still the controller does not receive
If any information is missing, please let me know!
NOTE: I have tried to pass only the POST parameter without the variable in the url and the result was the same
Thank you so much is exactly that!
– Otavio Souza Rocha
Vlw Otavio successful in development.
– Richard Ferreira