<?php
$query=("SELECT exam_ID, question, choice1, choice2, choice3,answer FROM exams ORDER BY RAND() LIMIT 5 " );
$result = @mysqli_query ($con, $query); // Run the query.
while($row =mysqli_fetch_array($result,MYSQLI_BOTH)):
?>
this is code is to help from get questions from my exams database but anytime i get this error
Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, null given in C:\xampp\htdocs\Login\question.php on line 29