コード例 #1
0
 public function deleteSport($id)
 {
     $this->id = $id;
     $table = "locations";
     $config = new config("localhost", "root", "", "play_a_sport_db", "", "mysqli");
     $db = new db($config);
     $db->openConnection();
     $result = $db->deleteRecord($table, $id);
     if ($result === true) {
         $url = 'sports.php';
         echo '<META HTTP-EQUIV=REFRESH CONTENT="0; ' . $url . '">';
     } else {
         $url = 'sports.php';
         echo '<META HTTP-EQUIV=REFRESH CONTENT="0; ' . $url . '">';
         echo 'Something went wrong!!!';
     }
 }