Then the loop below never ends
Code: Select all
//Music Uploading goes here
//Setup loop to check variables
if ($makechanges == "yes" && $band == "yes") {
for($i = 0; $i < 10 || $makechanges == "yes"; $i++) {
echo $i;
$currsongfile = 'songfile' . $i;
$currsongname = 'songname' . $i;
if ($$currsongname != "" && $$currsongfile != "") {
//Song Present - Run Tests
// include getID3() library (can be in a different directory if full path is specified)
require_once('./getid3/getid3/getid3.php');
// Initialize getID3 engine
$getID3 = new getID3;
// Analyze file and store returned data in $ThisFileInfo
$ThisFileInfo = $getID3->analyze($$currsongfile);
// Optional: copies data from all subarrays of [tags] into [comments] so
// metadata is all available in one location for all tag formats
// metainformation is always available under [tags] even if this is not called
getid3_lib::CopyTagsToComments($ThisFileInfo);
// Output desired information in whatever format you want
// Note: all entries in [comments] or [tags] are arrays of strings
// See structure.txt for information on what information is available where
// or check out the output of /demos/demo.browse.php for a particular file
// to see the full detail of what information is returned where in the array
$bitrate=@$ThisFileInfo['audio']['bitrate']; // audio bitrate
$time=@$ThisFileInfo['playtime_string']; // playtime in minutes:seconds, formatted string
$format=@$ThisFileInfo['fileformat'];
if ($bitrate == "" || $time == "" || $format != "mp3") {
//The file has no valid bitrate or no valid time or isn't an MP3 - reject
$makechages = "no";
echo "<center><font color=red><b>The File uploaded doesn't seem to be a valid MP3 - Rejecting File</b></font></center><br>";
}
}
}
}Code: Select all
for($i = 0; $i < 10 || $makechanges == "yes"; $i++) {