0
Next person I have a quiz and at the end a button Submit, when clicking I do some php operations to return a result of the quiz, but returns on the same page, with all questions of the quiz, I need to return this result or on a new page, or when I hit the button the questions would disappear and only the result would be, someone who can help me? this is the php button and code I’m using to give the result...
<button type="submit" name="btnSubmit">Enviar</button>
<?php
if ($_SERVER['REQUEST_METHOD']=='POST') {
if(isset($_POST['btnSubmit'])){
foreach ($_POST['question'] as $key => $value) {
$letter[$key] = array_sum($value);
}
echo '<div class="col-md-12">Letra com maior valor: '.array_search(max($letter),$letter).'</div>';
if (array_search(max($letter),$letter) == "A" ){
echo 'Lorem';
}
if (array_search(max($letter),$letter) == "B" ){
echo 'Lorem ipsum';
}
if (array_search(max($letter),$letter) == "C" ){
echo 'Lorem ipsum lorem';
}
}
}
?>
thanks I’ll try here ja return
– André