HTML Hidden value makes my submit button disappear


<?php $test1 = new test(); $test1->WrongAnswer(0); ?>
<?php $test2 = new test(); $test->WrongAnswer(1); ?>
<?php $test->WrongAnswer(2); ?>
<?php $test->WrongAnswer(3); ?>


I am trying to send data to my process.php and need to send another variable using the hidden attribute. Simply, why does this make submit button disappear?

It shouldn’t, not sure if it’s possible to answer without seeing your test class. You could also post the html output you get by running this code.

ps: in the last TestQuestion you have an extra “
” in the value attribute

There is most likely an error in your test() class ( probably in the getQuizName() function ) which prevents any further output. You should check your error logs to see if there is an error.

Also check the source code of the html after you load the page to confirm that the output stops after the ( or probably before it completes ) the hidden input.

Sponsor our Newsletter | Privacy Policy | Terms of Service