Location: PHPKode > scripts > eDJPanel > edjpanel/upload/admin/changebannedsongs.php
<?php error_reporting(0);
      require("head.php");?>
<center>
<h5>Add a Banned Song</h5>
<form action="showchangebannedsongs.php" method="post">
        <p>Song:</p>
        <p><input type="text" name="aname" /></p>
        <p>Artist:</p>
        <p><input type="text" name="artist" /></p>
        <p>Reason:</p>
        <p><input type="text" name="reason" /></p>
    <p><input type="submit" value="Add banned song!" /></p>
</form>

<h5>Delete a Banned Song</h5>
<form action="showchangebannedsongs.php" method="post">
        <p>Song:</p>
        <p><input type="text" name="dname" /></p>
    <p><input type="submit" value="Delete banned song!" /></p>
</form>
</center>

<?php require("config.php");

echo "<center>";
 if(isset($_POST['aname']) && isset($_POST['artist']) && isset($_POST['reason']))
      {
     $aname = clean_string($_POST['aname']);
      $artist = clean_string($_POST['artist']);
      $reason = clean_string($_POST['reason']);
     if ($_POST['reason'] == "")
         {
         echo "Please fill in all the fields.";
         } else {

          //Insert new Faction Info post
      mysql_query("INSERT INTO bannedsongs (Name, Artist, Reason)
      VALUES ('" . $aname . "','" . $artist . "','" . $reason . "')") or die(mysql_error());
      echo "Banned song sucessfully added!";
      }
      }

if(isset($_POST['dname']))
      {
    $dname = clean_string($_POST['dname']);
if ($_POST['dname'] == "")
    {
    echo "Please fill in the field.";
    } else {
          //Insert new Faction Info post
      mysql_query("DELETE FROM banned song
      WHERE Name='$dname'");
      echo "Banned song sucessfully deleted!";
    }
      }
echo "</center>";
      mysql_close($connect);
?>
Return current item: eDJPanel