Store the song names in an array when fed from the form. E.g.:
<form method="post" action="">
<!-- field labels and submit button excluded for simplicity -->
<input type="text" name="song[]" />
<input type="text" name="song[]" />
<input type="text" name="song[]" />
<input type="text" name="song[]" />
<input type="text" name="song[]" />
<input type="text" name="song[]" />
<!-- etc... -->
<input type="text" name="album" />
</form>
Then after form submission...
$songs = isset($_POST['song']) ? $_POST['song'] : array();
$album = isset($_POST['album']) ? $_POST['album'] : '';
// Remove empty song fields and implode
$songs = array_filter($songs);
$songs = implode(' ', $songs);
// You should make sure you validate values before executing them on your server
$output = shell_exec("D:\\apache\\htdocs\\test\\mp3wrap\\mp3wrap.exe {$album} {$songs}");
R.
blocblue
Practically a Posting Shark
837 posts since Jan 2008
Reputation Points: 272
Solved Threads: 161
Skill Endorsements: 12