removeEventForm accesses the super-global variable $_SERVER. Open
function removeEventForm(){
include('mysql_access.php');
echo "<h2>Remove an Event</h2>";
echo "<form method=\"post\" action=\"$_SERVER[PHP_SELF]\">";
echo "<select name=\"event\">";
- 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
eventDetailsForm accesses the super-global variable $_SERVER. Open
function eventDetailsForm(){
include('mysql_access.php');
echo "<h2>Add Event Details</h2>";
echo<<<FORM
- 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
assignPLForm accesses the super-global variable $_SERVER. Open
function assignPLForm(){
include('mysql_access.php');
echo "<h2>Assign Project Leader (Limit 1)</h2>";
echo <<<FORM
<form method="post" action="$_SERVER[PHP_SELF]">
- 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
editEventForm2 accesses the super-global variable $_SERVER. Open
function editEventForm2(){
include('mysql_access.php');
echo "<form method=\"post\" action=\"$_SERVER[PHP_SELF]\">";
echo "<select name=\"event\">";
$sql = "SELECT * FROM service_events ORDER BY name";
- 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
newEventForm accesses the super-global variable $_SERVER. Open
function newEventForm(){
echo<<<FORM
<h2>Add an Event</h2>
Please enter the name of the new event below:<br/>
<form method="post" action="$_SERVER[PHP_SELF]">
- 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
editEventForm accesses the super-global variable $_SERVER. Open
function editEventForm(){
include('mysql_access.php');
echo "<h2>Edit an Event</h2>";
echo "<form method=\"post\" action=\"$_SERVER[PHP_SELF]\">";
echo "<select name=\"event\">";
- 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
Method eventDetailsForm
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
function eventDetailsForm(){
include('mysql_access.php');
echo "<h2>Add Event Details</h2>";
echo<<<FORM
Method assignPLForm
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
function assignPLForm(){
include('mysql_access.php');
echo "<h2>Assign Project Leader (Limit 1)</h2>";
echo <<<FORM
<form method="post" action="$_SERVER[PHP_SELF]">
Avoid using undefined variables such as '$db' which will lead to PHP notices. Open
$query = $db->query($sql) or die("Error: line 24");
- 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
$query = $db->query($sql) or die("Error: line 29");
- 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
$query = $db->query($sql) or die("error".mysqli_error());
- 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
$query = $db->query($sql) or die("error".mysqli_error());
- 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
$query = $db->query($sql) or die("error".mysqli_error());
- 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
$query = $db->query($sql) or die("error".mysqli_error());
- 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 unused local variables such as '$db'. Open
$query = $db->query($sql) or die("error".mysqli_error());
- 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
The function assignPLForm() contains an exit expression. Open
$query = $db->query($sql) or die("Error: line 24");
- Read upRead up
- Exclude checks
ExitExpression
Since: 0.2
An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.
Example
class Foo {
public function bar($param) {
if ($param === 42) {
exit(23);
}
}
}
Source https://phpmd.org/rules/design.html#exitexpression
The function assignPLForm() contains an exit expression. Open
$query = $db->query($sql) or die("error".mysqli_error());
- Read upRead up
- Exclude checks
ExitExpression
Since: 0.2
An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.
Example
class Foo {
public function bar($param) {
if ($param === 42) {
exit(23);
}
}
}
Source https://phpmd.org/rules/design.html#exitexpression
Avoid unused local variables such as '$db'. Open
$query = $db->query($sql) or die("error".mysqli_error());
- 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
$query = $db->query($sql) or die("Error: line 29");
- 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
$query = $db->query($sql) or die("error".mysqli_error());
- 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
The function editEventForm2() contains an exit expression. Open
$query = $db->query($sql) or die("error".mysqli_error());
- Read upRead up
- Exclude checks
ExitExpression
Since: 0.2
An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.
Example
class Foo {
public function bar($param) {
if ($param === 42) {
exit(23);
}
}
}
Source https://phpmd.org/rules/design.html#exitexpression
The function eventDetailsForm() contains an exit expression. Open
$query = $db->query($sql) or die("Error: line 29");
- Read upRead up
- Exclude checks
ExitExpression
Since: 0.2
An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.
Example
class Foo {
public function bar($param) {
if ($param === 42) {
exit(23);
}
}
}
Source https://phpmd.org/rules/design.html#exitexpression
The function removeEventForm() contains an exit expression. Open
$query = $db->query($sql) or die("error".mysqli_error());
- Read upRead up
- Exclude checks
ExitExpression
Since: 0.2
An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.
Example
class Foo {
public function bar($param) {
if ($param === 42) {
exit(23);
}
}
}
Source https://phpmd.org/rules/design.html#exitexpression
The function editEventForm() contains an exit expression. Open
$query = $db->query($sql) or die("error".mysqli_error());
- Read upRead up
- Exclude checks
ExitExpression
Since: 0.2
An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.
Example
class Foo {
public function bar($param) {
if ($param === 42) {
exit(23);
}
}
}
Source https://phpmd.org/rules/design.html#exitexpression
Similar blocks of code found in 2 locations. Consider refactoring. Open
function removeEventForm(){
include('mysql_access.php');
echo "<h2>Remove an Event</h2>";
echo "<form method=\"post\" action=\"$_SERVER[PHP_SELF]\">";
echo "<select name=\"event\">";
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 128.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
function editEventForm(){
include('mysql_access.php');
echo "<h2>Edit an Event</h2>";
echo "<form method=\"post\" action=\"$_SERVER[PHP_SELF]\">";
echo "<select name=\"event\">";
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 128.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Avoid variables with short names like $r. Configured minimum length is 3. Open
while ($r = mysqli_fetch_array($query)) {
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Avoid variables with short names like $r. Configured minimum length is 3. Open
while ($r = mysqli_fetch_array($query)) {
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Avoid variables with short names like $r. Configured minimum length is 3. Open
while ($r = mysqli_fetch_array($query)) {
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Avoid variables with short names like $r. Configured minimum length is 3. Open
while ($r = mysqli_fetch_array($query)) {
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Avoid variables with short names like $r. Configured minimum length is 3. Open
while ($r = mysqli_fetch_array($query)) {
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Function closing brace must go on the next line following the body; found 1 blank lines before brace Open
}
- Exclude checks
Function closing brace must go on the next line following the body; found 1 blank lines before brace Open
}
- Exclude checks
Function closing brace must go on the next line following the body; found 1 blank lines before brace Open
}
- Exclude checks
Function closing brace must go on the next line following the body; found 1 blank lines before brace Open
}
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$query = $db->query($sql) or die("Error: line 29");
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
echo "</select><br/></td></tr>";
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
echo <<<FORM
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
echo "<form method=\"post\" action=\"$_SERVER[PHP_SELF]\">";
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 0 Open
echo <<<FORM
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$sql = "SELECT `id`, `firstname`, `lastname` FROM `contact_information` ORDER BY `lastname`";
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
while ($r = mysqli_fetch_array($query)) {
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
echo "</select>";
- Exclude checks
Opening brace should be on a new line Open
function editEventForm2(){
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$query = $db->query($sql) or die("error".mysqli_error());
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
while ($r = mysqli_fetch_array($query)) {
- Exclude checks
A closing tag is not permitted at the end of a PHP file Open
?>
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
include('mysql_access.php');
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
include('mysql_access.php');
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
echo "</select>";
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 0 Open
echo <<<FORM
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$query = $db->query($sql) or die("Error: line 24");
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 0 Open
echo <<<FORM
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 0 Open
echo<<<FORM
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$sql = "SELECT `P_Id`, `name` FROM `service_events` ORDER BY `P_Id`";
- Exclude checks
Opening brace should be on a new line Open
function newEventForm(){
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 0 Open
echo<<<FORM
- Exclude checks
Opening brace should be on a new line Open
function editEventForm(){
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
echo "<select name=\"event\">";
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
while ($r = mysqli_fetch_array($query)) {
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
echo "<h2>Assign Project Leader (Limit 1)</h2>";
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
echo "<select name=\"event\">";
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
echo "</select>";
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
include('mysql_access.php');
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
echo "<select name=\"event\">";
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
echo "<h2>Edit an Event</h2>";
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 0 Open
echo<<<FORM
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$query = $db->query($sql) or die("error".mysqli_error());
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
echo "<form method=\"post\" action=\"$_SERVER[PHP_SELF]\">";
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$query = $db->query($sql) or die("error".mysqli_error());
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
echo "<option value='$r[detail_id]'>{$r[name]}: {$r[DOW]} {$r[start]}-{$r[end]}</option>";
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
echo "</select>";
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
echo "<form method=\"post\" action=\"$_SERVER[PHP_SELF]\">";
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
while ($r = mysqli_fetch_array($query)) {
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
echo "<option value='$r[detail_id]'>{$r[name]}: {$r[DOW]} {$r[start]}-{$r[end]}</option>";
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
echo "</select>";
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
echo "<option value='$r[P_Id]'>{$r[name]}</option>";
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$sql = "SELECT e.name AS name, d.detail_id AS detail_id, d.event_id AS id,
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$sql = "SELECT e.name AS name, d.detail_id AS detail_id, d.event_id AS id,
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 0 Open
echo <<<FORM
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
echo "<h2>Remove an Event</h2>";
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$query = $db->query($sql) or die("error".mysqli_error());
- Exclude checks
Opening brace should be on a new line Open
function assignPLForm(){
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
echo "<select name=\"event\">";
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$sql = "SELECT * FROM service_events ORDER BY name";
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
while ($r = mysqli_fetch_array($query)) {
- Exclude checks
Opening brace should be on a new line Open
function eventDetailsForm(){
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
echo "<option value='$r[detail_id]'>{$r[name]}: {$r[DOW]} {$r[start]}-{$r[end]}</option>";
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
include('mysql_access.php');
- Exclude checks
Opening brace should be on a new line Open
function removeEventForm(){
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
$sql = "SELECT e.name AS name, d.detail_id AS detail_id, d.event_id AS id,
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
while ($r = mysqli_fetch_array($query)) {
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
echo "<h2>Add Event Details</h2>";
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
echo "<option value='$r[P_Id]'>$r[name]</option>";
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
echo "<option value='$r[id]'>$r[lastname], $r[firstname]</option>";
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
include('mysql_access.php');
- Exclude checks