I have a PHP page that displays as wanted, without showing any error messages.
When I View Source for this page I see PHP-generated error messages that do not display in the browser and are actually incorrect. For example, View source shows an error message "Undefined index 'score'" yet the value of "score" displays correctly. Another example is "Invalid argument supplied for foreach()", yet the foreach() loop executes correctly and shows the desired values.
Below is the view source output. Another mystery is that the view source text shows no entries between the table body tags, but the expected values in the table are showing in the browser.
The actual page as displayed in the browser is in the image here: http://estateagentsespana.com/quiz_fun.png. What is happening?
Code:<div class="container-fluid" style="width:90%;"> <div class="row"> <div class="col-xs-12 col-9" > <!--First Grid row abd first grid column used to hold index cards--> <p><br /> <b>Notice</b>: Undefined index: score in <b>C:\xampp\htdocs\bootstrapestate\quizzer2\final.php</b> on line <b>27</b><br /> Your score is: </p> <p><input type="submit" value = "Retake quiz" onclick="window.location.href = 'index.php?n=1&t=';"></p> <input type="button" id="reveal" value = "See answers" onclick="showanswers()"></p> <br /> <b>Notice</b>: Undefined index: performance in <b>C:\xampp\htdocs\bootstrapestate\quizzer2\final.php</b> on line <b>37</b><br /> <br /> <b>Warning</b>: Invalid argument supplied for foreach() in <b>C:\xampp\htdocs\bootstrapestate\quizzer2\final.php</b> on line <b>37</b><br /> <div id='ans'style='display:none;'><table class='table'> <thead> <tr> <th>Number</th> <th>Question</th> <th>Correct answer</th> <th>Your answer</th> </tr> </thead> <tbody> </tbody></table> <div class="row"> </div> </div>



Reply With Quote
Bookmarks