0
I have a php method that performs a certain task and then I need to give a successful/error feedback to the user and return to my index.php. This feedback can occur both before returning and in my own index.php. My current scenario is as follows::
$conexao->setSQL("INSERT INTO tab VALUES ('x');
$resultado = $conexao->Executar();
$erroRegistros = $totalRegistros - $adicRegistros;
if(!$resultado){
die("erro in uploading the file". mysql_error());
} else{
// FEEDBACK NECESSÁRIO E RETORNO AO MEU INDEX
voltarIndex();
}
In this class, there are only code in php. Already in my index.php there are html, javascript and even php.
For questions, my method backIndex() follows below:
function voltarIndex() {
header("Location: index.php");
}
Could someone help me ?
The
index.php
is a form?– Valdeir Psr
my home page, containing several buttons, tables and the like
– Alexsander Caproni
If possible post the part of the form responsible for sending the
post
, then I can supplement my reply withjavascript
.– Valdeir Psr