I am having a problem with  showing up in my first table box as well as my three actions are not working correctly… I Have been trying to find something within the code to fix this but without any luck. Hope you guys can help me!
Here is my Code:
[php]
Song Organizer
<?php if (isset($_GET['action'])) { if ((file_exists("SongOrganizer/songs.txt")) && (filesize("SongOrganizer/song.txt") != 0)) { $SongArray = file("SongOrganizer/songs.txt"); switch ($_GET['action']) { case 'Remove Duplicates': $SongArray = array_unique($SongArray); $SongArray = array_values($SongArray); break; case 'Sort Ascending': sort($SongArray); break; case 'Shuffle': shuffle($SongArray); break; }//End of the switch Statment if (count($SongArray)>0) { $NewSongs = implode($SongArray); $SongStore = fopen("SongOrganizer/songs.txt", "wb"); if($SongStore === false) echo "There was an error updating the song file\n"; else { fwrite($SongStore, $NewSongs); fclose($SongStore); } } else unlink("SongOrganizer/songs.txt"); } } if(isset($_POST['submit'])) { $SongToAdd = stripslashes($_POST['SongName']) . "\n"; $ExistingSongs = array(); if (file_exists("SongOrganizer/songs.txt") && filesize("SongOrganizer/songs.txt") > 0) { $ExistingSongs = file("SongOrganizer/songs.txt"); } if(in_array($SongToAdd, $ExistingSongs)) { echo "The song you entered already exists!
\n";
echo "Your song was not added to the list
}
if ((!file_exists(“SongOrganizer/songs.txt”)) || (filesize(“SongOrganizer/songs.txt”) == 0))
echo “
There are no songs in the list.
\n”;else
{
$SongArray = file(“SongOrganizer/songs.txt”);
echo “<table border=“1” width=“100%” style=“background-color:lightgray”>\n”;
foreach ($SongArray as $Song)
{
echo “
echo “
echo “
}
echo “\n”;
}
?>
Sort Song List
Remove Duplicate Songs
Randomize Song list
Add a New Song
Song Name:
[/php]