grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
show_active accesses the super-global variable $_POST. Open
function show_active() {
if (passed_quiz()) {
$user_id = $_SESSION['sessionID'];
include('mysql_access.php');
$response=$db->query("SELECT position FROM contact_information WHERE id = $user_id");
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
passed_quiz accesses the super-global variable $_SESSION. Open
function passed_quiz() {
include ('mysql_access.php');
//check if the user has passed the quiz
if (isset($_SESSION['sessionID'])) {
$user_id = $_SESSION['sessionID'];
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
show_active accesses the super-global variable $_SESSION. Open
function show_active() {
if (passed_quiz()) {
$user_id = $_SESSION['sessionID'];
include('mysql_access.php');
$response=$db->query("SELECT position FROM contact_information WHERE id = $user_id");
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
passed_quiz accesses the super-global variable $_SESSION. Open
function passed_quiz() {
include ('mysql_access.php');
//check if the user has passed the quiz
if (isset($_SESSION['sessionID'])) {
$user_id = $_SESSION['sessionID'];
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_SESSION. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_POST. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
grade_quiz accesses the super-global variable $_SESSION. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
Function grade_quiz
has a Cognitive Complexity of 124 (exceeds 5 allowed). Consider refactoring. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method grade_quiz
has 315 lines of code (exceeds 25 allowed). Consider refactoring. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
File risk_management_quiz.php
has 463 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
require_once ('session.php');
require_once ('mysql_access.php');
?>
<!doctype html>
Method show_active
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
function show_active() {
if (passed_quiz()) {
$user_id = $_SESSION['sessionID'];
include('mysql_access.php');
$response=$db->query("SELECT position FROM contact_information WHERE id = $user_id");
Method show_quiz
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
function show_quiz() {
include('mysql_access.php');
//display the actual quiz, pick 20 random questions from the 30 in the database
$response=$db->query("SELECT * FROM questions ORDER BY rand() LIMIT 20");?>
<br>
Function show_active
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function show_active() {
if (passed_quiz()) {
$user_id = $_SESSION['sessionID'];
include('mysql_access.php');
$response=$db->query("SELECT position FROM contact_information WHERE id = $user_id");
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
The function grade_quiz() has an NPath complexity of 617673396283947. The configured NPath complexity threshold is 200. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The function grade_quiz() has 352 lines of code. Current threshold is set to 100. Avoid really long methods. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Exclude checks
The function grade_quiz() has a Cyclomatic Complexity of 63. The configured cyclomatic complexity threshold is 10. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
CyclomaticComplexity
Since: 0.1
Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.
Example
// Cyclomatic Complexity = 11
class Foo {
1 public function example() {
2 if ($a == $b) {
3 if ($a1 == $b1) {
fiddle();
4 } elseif ($a2 == $b2) {
fiddle();
} else {
fiddle();
}
5 } elseif ($c == $d) {
6 while ($c == $d) {
fiddle();
}
7 } elseif ($e == $f) {
8 for ($n = 0; $n < $h; $n++) {
fiddle();
}
} else {
switch ($z) {
9 case 1:
fiddle();
break;
10 case 2:
fiddle();
break;
11 case 3:
fiddle();
break;
default:
fiddle();
break;
}
}
}
}
Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity
Avoid using undefined variables such as '$db' which will lead to PHP notices. Open
$response=$db->query("SELECT position FROM contact_information WHERE id = $user_id");
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$db' which will lead to PHP notices. Open
$response=$db->query("SELECT * FROM contact_information WHERE risk_management != '0000-00-00' ORDER BY lastname");
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$db' which will lead to PHP notices. Open
$response=$db->query("SELECT * FROM contact_information WHERE risk_management = '0000-00-00' ORDER BY lastname");
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$db' which will lead to PHP notices. Open
$result = $db->query($sql);
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$db' which will lead to PHP notices. Open
$result = $db->query($sql);
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$db' which will lead to PHP notices. Open
$response=$db->query("SELECT * FROM questions ORDER BY rand() LIMIT 20");?>
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
The method show_active uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
echo "<h2>Risk Management Quiz</h2>";
if (count($_POST) > 0) {
grade_quiz();
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method passed_quiz uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
else {
return false;
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method show_active uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
else{
echo '<h2>You have passed the quiz!</h2>';
echo '<h3>As a reward you have unlocked : RISK alert button<br>';
?>
<audio id="myTune">
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method show_active uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
else {
show_quiz();
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method grade_quiz uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
else {
//show correct answer for question
echo "Question : Which of the following laws and regulations applies to members?<br>";
echo "Correct Answer : All of the above<br>";
echo "<br>";
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method grade_quiz uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
else {
//show correct answer for question
echo "Question : Is the national fraternity a dry organization?<br>";
echo "Correct Answer : No<br>";
echo "<br>";
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method grade_quiz uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
else {
//show correct answer for question
echo "Question : Who takes over for the president?<br>";
echo "Correct Answer : VP of large service<br>";
echo "<br>";
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method grade_quiz uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
else {
//show correct answer for questio
echo "Question : What cannot be purchased with fraternity funds?<br>";
echo "Correct Answer : Alcohol<br>";
echo "<br>";
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method grade_quiz uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
else {
//show correct answer for question
echo "Question : Do unofficial APO functions exist?<br>";
echo "Correct Answer : No<br>";
echo "<br>";
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method grade_quiz uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
else {
//show correct answer for question
echo "Question : Do members need to use proper safety equipment?<br>";
echo "Correct Answer : Yes<br>";
echo "<br>";
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method grade_quiz uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
else {
//show correct answer for question
echo "Question : Which is not in the risk management policy regarding transportation?<br>";
echo "Correct Answer : Starting with a full tank of gas<br>";
echo "<br>";
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method grade_quiz uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
else {
//show correct answer for question
echo "Question : What are you supposed to do during a chapter emergency?<br>";
echo "Correct Answer : All of the above<br>";
echo "<br>";
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method grade_quiz uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
else {
//show correct answer for question
echo "Question : Where can I post ritual information<br>";
echo "Correct Answer : Nowhere<br>";
echo "<br>";
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method grade_quiz uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
else {
//show correct answer for question
echo "Question : Who is the spokesperson for the chapter?<br>";
echo "Correct Answer : The president<br>";
echo "<br>";
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method grade_quiz uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
else {
//show correct answer for question
echo "Question : Is Epsilon a dry organization?<br>";
echo "Correct Answer : Yes<br>";
echo "<br>";
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method grade_quiz uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
else {
//show correct answer for question
echo "Question : What is a violation of the national fraternity membership policies?<br>";
echo "Correct Answer : All of the above<br>";
echo "<br>";
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method grade_quiz uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
else {
//show correct answer for question
echo "Question : What should be available when alcoholic beverages are served?<br>";
echo "Correct Answer : All of the above<br>";
echo "<br>";
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method grade_quiz uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
else {
//show correct answer for question
echo "Question : What does APO say about hazing?<br>";
echo "Correct Answer : Hazing is forbidden<br>";
echo "<br>";
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method grade_quiz uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
else {
//show correct answer for question
echo "Question : What should I do if the chainsaw I'm supposed to use during camp service has a damaged wire?<br>";
echo "Correct Answer : You can't use it<br>";
echo "<br>";
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method grade_quiz uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
else {
//show correct answer for question
echo "Question : Who cannot be served alcoholic beverages?<br>";
echo "Correct Answer : All of the above<br>";
echo "<br>";
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method grade_quiz uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
else {
//show correct answer for question
echo "Question : If I see a negative yak about APO what do I do?<br>";
echo "Correct Answer : All of the above<br>";
echo "<br>";
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method grade_quiz uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
else {
//show correct answer for question
echo "Question : What can the chapter not sell?<br>";
echo "Correct Answer : Alcoholic beverages<br>";
echo "<br>";
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method grade_quiz uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
else {
//show correct answer for question
echo "Question : What happens to members who violate the risk management policy?<br>";
echo "Correct Answer : J-Board<br>";
echo "<br>";
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method grade_quiz uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
else {
//show correct answer for question
echo "Question : Who is required to wear a seatbelt?<br>";
echo "Correct Answer : State's laws<br>";
echo "<br>";
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method grade_quiz uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
else {
//show correct answer for question
echo "Question : What should you do if questioned?<br>";
echo "Correct Answer : Say no comment<br>";
echo "<br>";
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method grade_quiz uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
else {
//show correct answer for question
echo "Question : How often does instruction need to be given on risk management?<br>";
echo "Correct Answer : Once a year<br>";
echo "<br>";
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method grade_quiz uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
else {
//show correct answer for question
echo "Question : What happens if I loan my crockpot and it breaks?<br>";
echo "Correct Answer : I have to pay for damages<br>";
echo "<br>";
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method grade_quiz uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
else {
//show correct answer for questio
echo "Question : If I'm taking a picture with APO letters, can I flip the bird?<br>";
echo "Correct Answer : No<br>";
echo "<br>";
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method grade_quiz uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
else {
//show correct answer for question
echo "Question : Can there be alcohol at rush?<br>";
echo "Correct Answer : No<br>";
echo "<br>";
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method grade_quiz uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
else {
//show correct answer for question
echo "Question : Does Epsilon need to provide sober drivers?<br>";
echo "Correct Answer : Yes<br>";
echo "<br>";
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method grade_quiz uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
else {
echo "Sorry, you must score 20/20. Please try again.";
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method grade_quiz uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
else {
//show correct answer for question
echo "Question : Who is responsible for guests at chapter functions?<br>";
echo "Correct Answer : All members<br>";
echo "<br>";
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method grade_quiz uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
else {
//show correct answer for question
echo "Question : If an event is called unofficial by a member, what does that mean in the eyes of the law, the campus, and the fraternity?<br>";
echo "Correct Answer : It's official<br>";
echo "<br>";
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method grade_quiz uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
else {
//show correct answer for question
echo "Question : What is not allowed on my personal facebook page?<br>";
echo "Correct Answer : A negative post about APO<br>";
echo "<br>";
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method grade_quiz uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
else {
//show correct answer for question
echo "Question : Can I wear my letters while drinking alcohol?<br>";
echo "Correct Answer : No<br>";
echo "<br>";
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid unused local variables such as '$db'. Open
$response=$db->query("SELECT * FROM contact_information WHERE risk_management != '0000-00-00' ORDER BY lastname");
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
Avoid unused local variables such as '$db'. Open
$response=$db->query("SELECT * FROM contact_information WHERE risk_management = '0000-00-00' ORDER BY lastname");
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
Avoid unused local variables such as '$db'. Open
$result = $db->query($sql);
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
Avoid unused local variables such as '$db'. Open
$response=$db->query("SELECT position FROM contact_information WHERE id = $user_id");
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
Avoid unused local variables such as '$db'. Open
$response=$db->query("SELECT * FROM questions ORDER BY rand() LIMIT 20");?>
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
Avoid unused local variables such as '$db'. Open
$result = $db->query($sql);
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
Avoid unused local variables such as '$result'. Open
$result = $db->query($sql);
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 27 and the first side effect is on line 2. Open
<?php
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "false" but found "False" Open
$public_page = False;
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ($result['status'] != 'Alumni') and ($result['status'] != 'Advisor') and ($result['status'] != 'Inactive') ) {
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "false" but found "False" Open
$exec_page = False;
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "true" but found "True" Open
$active_page = True;
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( ($result['status'] != 'Alumni') and ($result['status'] != 'Advisor') and ($result['status'] != 'Pledge') ) {
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
if($_POST["27"]==2){
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
echo "<br>";
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$score++;
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
//show correct answer for question
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Blank line found at end of control structure Open
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
if(isset($_POST["27"])) {
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
echo "Question : Is the national fraternity a dry organization?<br>";
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
echo "Correct Answer : No<br>";
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
echo "Question : Is Epsilon a dry organization?<br>";
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
if($_POST["28"]==1){
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$score++;
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
if(isset($_POST["28"])) {
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
echo "Correct Answer : Yes<br>";
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
else {
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
echo "<br>";
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
if(isset($_POST["29"])) {
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
else {
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
else {
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
//show correct answer for question
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$result = $db->query($sql);
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
else {
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
else {
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
//show correct answer for question
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
//results
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$user_id = $_SESSION['sessionID'];
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
echo "Question : Do members need to use proper safety equipment?<br>";
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
echo "Correct Answer : Yes<br>";
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
echo "Your Score is: " . $score . " of 20<br>";
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
<input type="submit" value="Submit">
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
if($_POST["29"]==1){
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$count = 0;
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
echo "Correct Answer : Yes<br>";
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$sql = "UPDATE `apo` . `contact_information` SET `risk_management` = '$timestamp' WHERE id='$user_id'";
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
echo "<br>";
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
echo "Sorry, you must score 20/20. Please try again.";
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
if($_POST["30"]==1){
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$score++;
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
include ('mysql_access.php');
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
while($result=mysqli_fetch_array($response)){
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
//show correct answer for question
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
echo "You passed!";
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$count++; ?>
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
if (isset($_SESSION['sessionID'])) {
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
if($score>19) {
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$timestamp = date('Y-m-d');
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
echo "Question : Does Epsilon need to provide sober drivers?<br>";
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
//display the actual quiz, pick 20 random questions from the 30 in the database
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$score++;
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
echo "<br>";
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
if(isset($_POST["30"])) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (count($_POST) > 0) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<?php
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<audio id="myTune">
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<?php
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
show_quiz();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<audio id="myTune">
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
grade_quiz();
- Exclude checks
Line exceeds 120 characters; contains 121 characters Open
if ( ($result['status'] != 'Alumni') and ($result['status'] != 'Advisor') and ($result['status'] != 'Inactive') ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<button onclick="document.getElementById('myTune').play()">RISK ALERT</button>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<source src="RISK.wav">
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
//include results for the sarge and webmaster
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<source src="RISK.wav">
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
</audio>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
//leave out members who do not need this quiz
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
?>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<button onclick="document.getElementById('myTune').play()">RISK ALERT</button>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
//count may be simplified with SQL query
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "<h2>Risk Management Quiz</h2>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
?>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo '<h3>As a reward you have unlocked : RISK alert button<br>';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
</audio>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$score = 0;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if(isset($_POST["4"])) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$score++;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Question : Who cannot be served alcoholic beverages?<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
//show correct answer for question
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Correct Answer : It's official<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$score++;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if($_POST["3"]==3){
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if($_POST["4"]==4){
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$score++;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$score++;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$score++;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Correct Answer : All members<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Correct Answer : All of the above<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if($_POST["1"]==1){
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
//show correct answer for question
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Correct Answer : All of the above<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if(isset($_POST["8"])) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if(isset($_POST["9"])) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if(isset($_POST["1"])) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if($_POST["6"]==2){
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Question : Who is required to wear a seatbelt?<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if($_POST["9"]==2){
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Question : What should you do if questioned?<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$score++;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$score++;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Question : What should be available when alcoholic beverages are served?<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
//questions
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if($_POST["5"]==3){
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Correct Answer : J-Board<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if(isset($_POST["6"])) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Correct Answer : Starting with a full tank of gas<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
//show correct answer for question
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Correct Answer : VP of large service<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Line exceeds 120 characters; contains 141 characters Open
echo '<tr><td>' . $result['lastname'] . '</td><td>' . $result['firstname'] . '</td><td>' . $result['risk_management'] . '</td></tr>';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
//check if the user has passed the quiz
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Question : Who is responsible for guests at chapter functions?<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if(isset($_POST["18"])) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if(isset($_POST["19"])) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Correct Answer : Alcoholic beverages<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if($_POST["7"]==1){
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Correct Answer : State's laws<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Question : Which is not in the risk management policy regarding transportation?<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
//show correct answer for questio
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Correct Answer : Alcohol<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
//show correct answer for question
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if(isset($_POST["2"])) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Correct Answer : The president<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if($_POST["2"]==4){
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
//show correct answer for question
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
//show correct answer for question
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Question : If an event is called unofficial by a member, what does that mean in the eyes of the law, the campus, and the fraternity?<br>";
- Exclude checks
Line exceeds 120 characters; contains 127 characters Open
echo "Question : What should I do if the chainsaw I'm supposed to use during camp service has a damaged wire?<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
//show correct answer for question
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
//show correct answer for question
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Question : What does APO say about hazing?<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Question : What is a violation of the national fraternity membership policies?<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if(isset($_POST["3"])) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if(isset($_POST["5"])) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$score++;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if(isset($_POST["7"])) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$score++;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$score++;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Correct Answer : All of the above<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$score++;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if($_POST["12"]==1){
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$score++;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if($_POST["16"]==4){
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
//show correct answer for question
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$score++;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Correct Answer : You can't use it<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
//leave out members who do not need this quiz
- Exclude checks
Line exceeds 120 characters; contains 165 characters Open
echo '<tr><td>' . $result['lastname'] . '</td><td>' . $result['firstname'] . '</td><td>' . $result['status'] . '</td><td>' . $result['email'] . '</td></tr>';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
//show correct answer for question
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
//show correct answer for question
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
//show correct answer for question
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
//show correct answer for question
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if(isset($_POST["14"])) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Correct Answer : Hazing is forbidden<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "<br>";
- Exclude checks
Line exceeds 120 characters; contains 156 characters Open
echo "Question : If an event is called unofficial by a member, what does that mean in the eyes of the law, the campus, and the fraternity?<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if($_POST["8"]==3){
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if($_POST["11"]==2){
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if(isset($_POST["12"])) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if($_POST["13"]==4){
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if($_POST["15"]==3){
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Question : What happens to members who violate the risk management policy?<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if($_POST["10"]==4){
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Question : What are you supposed to do during a chapter emergency?<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Question : What can the chapter not sell?<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$score++;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
//show correct answer for question
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Question : Who takes over for the president?<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Correct Answer : All of the above<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if(isset($_POST["17"])) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
//show correct answer for question
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Question : Which of the following laws and regulations applies to members?<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Question : Who is the spokesperson for the chapter?<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Correct Answer : Say no comment<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if($_POST["17"]==1){
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if(isset($_POST["11"])) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if(isset($_POST["13"])) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if(isset($_POST["10"])) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$score++;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$score++;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Question : What cannot be purchased with fraternity funds?<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$score++;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if($_POST["14"]==1){
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Correct Answer : All of the above<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if(isset($_POST["15"])) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Correct Answer : I have to pay for damages<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if($_POST["18"]==2){
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
//show correct answer for question
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if($_POST["19"]==3){
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
//show correct answer for question
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if(isset($_POST["16"])) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Question : What happens if I loan my crockpot and it breaks?<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$score++;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Question : What should I do if the chainsaw I'm supposed to use during camp service has a damaged wire?<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
//show correct answer for question
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if(isset($_POST["23"])) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$score++;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Question : How often does instruction need to be given on risk management?<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Correct Answer : No<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if(isset($_POST["20"])) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Correct Answer : Nowhere<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$score++;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Question : If I'm taking a picture with APO letters, can I flip the bird?<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Correct Answer : No<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Question : Can I wear my letters while drinking alcohol?<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if(isset($_POST["22"])) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if($_POST["23"]==2){
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$score++;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if($_POST["20"]==2){
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if(isset($_POST["21"])) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Correct Answer : All of the above<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
//show correct answer for question
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Question : What is not allowed on my personal facebook page?<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$score++;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if($_POST["24"]==2){
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
//show correct answer for question
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Correct Answer : No<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Correct Answer : No<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Correct Answer : A negative post about APO<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Question : Where can I post ritual information<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
//show correct answer for question
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
//show correct answer for question
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Correct Answer : Once a year<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Question : Do unofficial APO functions exist?<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if(isset($_POST["26"])) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if($_POST["26"]==2){
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$score++;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if(isset($_POST["24"])) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$score++;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if($_POST["25"]==2){
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$score++;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
//show correct answer for questio
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if(isset($_POST["25"])) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if($_POST["22"]==2){
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Question : Can there be alcohol at rush?<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$score++;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if($_POST["21"]==4){
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
//show correct answer for question
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
//show correct answer for question
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo "Question : If I see a negative yak about APO what do I do?<br>";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Line exceeds 120 characters; contains 152 characters Open
<input type="radio" checked='checked' value="5" style='display:none' id='radio4_<?php echo $result['id'];?>' name='<?php echo $result['id'];?>'>
- Exclude checks
Space before opening parenthesis of function call prohibited Open
require_once ('mysql_access.php');
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 6 Open
$result=mysqli_fetch_array($response);
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
show_pass();
- Exclude checks
Opening brace should be on a new line Open
function show_pass() {
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 6 Open
$response=$db->query("SELECT position FROM contact_information WHERE id = $user_id");
- Exclude checks
Expected 1 space after WHILE keyword; 0 found Open
while($result=mysqli_fetch_array($response)){
- Exclude checks
Opening brace should be on a new line Open
function show_active() {
- Exclude checks
Expected 1 space after closing brace; newline found Open
}
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
while($result=mysqli_fetch_array($response)){
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 6 Open
$user_id = $_SESSION['sessionID'];
- Exclude checks
Whitespace found at end of line Open
//leave out members who do not need this quiz
- Exclude checks
Expected 1 space after ELSE keyword; 0 found Open
else{
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
echo '<h2>You have passed the quiz!</h2>';
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
echo '<h3>As a reward you have unlocked : RISK alert button<br>';
- Exclude checks
Expected 1 space after closing brace; newline found Open
}
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 6 Open
include('mysql_access.php');
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 6 Open
if ($result['position'] == 'Sergeant at Arms' or $result['position'] == 'Webmaster') {
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 6 Open
if ( ($result['status'] != 'Alumni') and ($result['status'] != 'Advisor') and ($result['status'] != 'Inactive') ) {
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 6 Open
else{
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( ($result['status'] != 'Alumni') and ($result['status'] != 'Advisor') and ($result['status'] != 'Inactive') ) {
- Exclude checks
Space before opening parenthesis of function call prohibited Open
require_once ('session.php');
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 6 Open
}
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 6 Open
}
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
echo '<h1>PASSED THE QUIZ</h1><br>';
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
echo '<h1>NEED TO PASS THE QUIZ</h1><br>';
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
show_fail();
- Exclude checks
Opening brace should be on a new line Open
function show_fail() {
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if($_POST["5"]==3){
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if($_POST["6"]==2){
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 6 Open
if ( ($result['status'] != 'Alumni') and ($result['status'] != 'Advisor') and ($result['status'] != 'Pledge') ) {
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if($_POST["8"]==3){
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if(isset($_POST["4"])) {
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if(isset($_POST["5"])) {
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if($_POST["5"]==3){
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if($_POST["7"]==1){
- Exclude checks
Expected 1 space after WHILE keyword; 0 found Open
while($result=mysqli_fetch_array($response)){
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
while($result=mysqli_fetch_array($response)){
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 6 Open
}
- Exclude checks
Expected 1 space after closing brace; newline found Open
}
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if($_POST["1"]==1){
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if($_POST["7"]==1){
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
echo '<tr><td>' . $result['lastname'] . '</td><td>' . $result['firstname'] . '</td><td>' . $result['status'] . '</td><td>' . $result['email'] . '</td></tr>';
- Exclude checks
Expected 1 space after closing brace; newline found Open
}
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if(isset($_POST["2"])) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( ($result['status'] != 'Alumni') and ($result['status'] != 'Advisor') and ($result['status'] != 'Pledge') ) {
- Exclude checks
Opening brace should be on a new line Open
function passed_quiz() {
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if($_POST["6"]==2){
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if(isset($_POST["13"])) {
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if($_POST["13"]==4){
- Exclude checks
Expected 1 space after closing brace; newline found Open
}
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if(isset($_POST["3"])) {
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if($_POST["3"]==3){
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if($_POST["4"]==4){
- Exclude checks
Opening brace should be on a new line Open
function grade_quiz() {
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if($_POST["2"]==4){
- Exclude checks
Expected 1 space after closing brace; newline found Open
}
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if($_POST["4"]==4){
- Exclude checks
Expected 1 space after closing brace; newline found Open
}
- Exclude checks
Expected 1 space after closing brace; newline found Open
}
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if($_POST["14"]==1){
- Exclude checks
Expected 1 space after closing brace; newline found Open
}
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if(isset($_POST["18"])) {
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if(isset($_POST["19"])) {
- Exclude checks
Line indented incorrectly; expected 0 spaces, found 2 Open
}
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if($_POST["2"]==4){
- Exclude checks
Expected 1 space after closing brace; newline found Open
}
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if(isset($_POST["8"])) {
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if($_POST["8"]==3){
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if($_POST["9"]==2){
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if($_POST["11"]==2){
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if(isset($_POST["16"])) {
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if(isset($_POST["17"])) {
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if($_POST["18"]==2){
- Exclude checks
Expected 1 space after closing brace; newline found Open
}
- Exclude checks
Space before opening parenthesis of function call prohibited Open
include ('mysql_access.php');
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if(isset($_POST["1"])) {
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if($_POST["1"]==1){
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if(isset($_POST["9"])) {
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 6 Open
}
- Exclude checks
Expected 1 space after closing brace; newline found Open
}
- Exclude checks
Expected 1 space after closing brace; newline found Open
}
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if(isset($_POST["7"])) {
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if($_POST["9"]==2){
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if($_POST["12"]==1){
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if($_POST["18"]==2){
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
$count++;
- Exclude checks
Closing brace indented incorrectly; expected 0 spaces, found 2 Open
}
- Exclude checks
Expected 1 space after closing brace; newline found Open
}
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if($_POST["12"]==1){
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if(isset($_POST["14"])) {
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
$count++;
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if($_POST["3"]==3){
- Exclude checks
Expected 1 space after closing brace; newline found Open
}
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if($_POST["11"]==2){
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if($_POST["16"]==4){
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
echo '<tr><td>' . $result['lastname'] . '</td><td>' . $result['firstname'] . '</td><td>' . $result['risk_management'] . '</td></tr>';
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if(isset($_POST["6"])) {
- Exclude checks
Expected 1 space after closing brace; newline found Open
}
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if(isset($_POST["10"])) {
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if($_POST["17"]==1){
- Exclude checks
Expected 1 space after closing brace; newline found Open
}
- Exclude checks
Expected 1 space after closing brace; newline found Open
}
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if(isset($_POST["12"])) {
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if(isset($_POST["15"])) {
- Exclude checks
Expected 1 space after closing brace; newline found Open
}
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if($_POST["10"]==4){
- Exclude checks
Expected 1 space after closing brace; newline found Open
}
- Exclude checks
Expected 1 space after closing brace; newline found Open
}
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if($_POST["16"]==4){
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if($_POST["14"]==1){
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if($_POST["10"]==4){
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if($_POST["13"]==4){
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if($_POST["15"]==3){
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if($_POST["17"]==1){
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if(isset($_POST["11"])) {
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if($_POST["15"]==3){
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if($_POST["21"]==4){
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if($_POST["23"]==2){
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if($_POST["23"]==2){
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if(isset($_POST["28"])) {
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if($_POST["28"]==1){
- Exclude checks
Expected 1 space after closing brace; newline found Open
}
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if($_POST["26"]==2){
- Exclude checks
Expected 1 space after closing brace; newline found Open
}
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if(isset($_POST["21"])) {
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if(isset($_POST["22"])) {
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if(isset($_POST["27"])) {
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if($_POST["26"]==2){
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if($_POST["19"]==3){
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if($_POST["22"]==2){
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if($_POST["24"]==2){
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if($_POST["27"]==2){
- Exclude checks
Expected 1 space after closing brace; newline found Open
}
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if($_POST["28"]==1){
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if($_POST["21"]==4){
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if($_POST["27"]==2){
- Exclude checks
Expected 1 space after closing brace; newline found Open
}
- Exclude checks
Expected 1 space after closing brace; newline found Open
}
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if($_POST["20"]==2){
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if(isset($_POST["25"])) {
- Exclude checks
Expected 1 space after closing brace; newline found Open
}
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if(isset($_POST["20"])) {
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if($_POST["22"]==2){
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if(isset($_POST["23"])) {
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if(isset($_POST["24"])) {
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if($_POST["24"]==2){
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if($_POST["30"]==1){
- Exclude checks
Expected 1 space after WHILE keyword; 0 found Open
while($result=mysqli_fetch_array($response)){
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if($_POST["20"]==2){
- Exclude checks
Expected 1 space after closing brace; newline found Open
}
- Exclude checks
Expected 1 space after closing brace; newline found Open
}
- Exclude checks
Expected 1 space after closing brace; newline found Open
}
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if($_POST["25"]==2){
- Exclude checks
Expected 1 space after closing brace; newline found Open
}
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if($_POST["30"]==1){
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
}
- Exclude checks
Opening brace should be on a new line Open
function show_quiz() {
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if(isset($_POST["26"])) {
- Exclude checks
Whitespace found at end of line Open
}
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if($_POST["29"]==1){
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if($_POST["19"]==3){
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if($_POST["25"]==2){
- Exclude checks
Expected 1 space after closing brace; newline found Open
}
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
$count++; ?>
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
while($result=mysqli_fetch_array($response)){
- Exclude checks
Whitespace found at end of line Open
while($result=mysqli_fetch_array($response)){
- Exclude checks
Expected 1 space after closing brace; newline found Open
}
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if($_POST["29"]==1){
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if(isset($_POST["30"])) {
- Exclude checks
Expected 1 space after closing brace; newline found Open
}
- Exclude checks
Space before opening parenthesis of function call prohibited Open
include ('mysql_access.php');
- Exclude checks
Closing brace indented incorrectly; expected 8 spaces, found 4 Open
}
- Exclude checks
Whitespace found at end of line Open
<?php
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if(isset($_POST["29"])) {
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if($score>19) {
- Exclude checks
The variable $user_id is not named in camelCase. Open
function passed_quiz() {
include ('mysql_access.php');
//check if the user has passed the quiz
if (isset($_SESSION['sessionID'])) {
$user_id = $_SESSION['sessionID'];
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $user_id is not named in camelCase. Open
function show_active() {
if (passed_quiz()) {
$user_id = $_SESSION['sessionID'];
include('mysql_access.php');
$response=$db->query("SELECT position FROM contact_information WHERE id = $user_id");
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $user_id is not named in camelCase. Open
function passed_quiz() {
include ('mysql_access.php');
//check if the user has passed the quiz
if (isset($_SESSION['sessionID'])) {
$user_id = $_SESSION['sessionID'];
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $user_id is not named in camelCase. Open
function show_active() {
if (passed_quiz()) {
$user_id = $_SESSION['sessionID'];
include('mysql_access.php');
$response=$db->query("SELECT position FROM contact_information WHERE id = $user_id");
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $user_id is not named in camelCase. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $user_id is not named in camelCase. Open
function grade_quiz() {
//This part of the code is ridiculously hardcoded for now. Should use SQL to check for correct answers.
$score = 0;
//questions
if(isset($_POST["1"])) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}