Bläddra i källkod

Remove dead alert() calls after exit() in table.php and dashboard.php

alert() is a JavaScript function. In PHP context after exit() it is
both unreachable and meaningless — these lines never executed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Benjamin Harris 2 veckor sedan
förälder
incheckning
93e1ea0ae1
2 ändrade filer med 0 tillägg och 3 borttagningar
  1. 0 1
      dashboard.php
  2. 0 2
      table.php

+ 0 - 1
dashboard.php

@@ -87,7 +87,6 @@ $not_required = "<i class='h2 bi bi-dash-circle-fill'></i>";
                             if (!$result) {
                                 printf("Error: %s\n", mysqli_error($con));
                                 exit();
-                                alert("error");
                             }
 
                             while ($row = mysqli_fetch_array($result)) {

+ 0 - 2
table.php

@@ -9,7 +9,6 @@ $result = mysqli_query($con, " SELECT * FROM `details` WHERE drg = $drg ORDER BY
 if (!$result) {
     printf("Error: %s\n", mysqli_error($con));
     exit();
-    alert("error");
 }
 
 while ($row = mysqli_fetch_array($result)) {
@@ -72,7 +71,6 @@ $result = mysqli_query($con, " SELECT * FROM `addresses` WHERE  drg = $drg ORDER
 if (!$result) {
     printf("Error: %s\n", mysqli_error($con));
     exit();
-    alert("error");
 }
 
 while ($row = mysqli_fetch_array($result)) {