header("Location:soundtest_list.php?cat=" . $_REQUEST['cat'] . "&sound=" . $_REQUEST['sound']);
    exit;
}
if ($_POST['commit'] == "Save Sound Test") {
    if ($id == 0) {
        // insert
        $obj = new SoundTest();
        $obj->SoundId = $_REQUEST["sound"];
        $obj->SoundTestDescription = $_REQUEST["sound_test_description"];
        $obj->SoundUrl1 = $_REQUEST["sound_url1"];
        $obj->SoundUrl2 = $_REQUEST["sound_url2"];
        $obj->SoundUrl3 = $_REQUEST["sound_url3"];
        $obj->Text1 = $_REQUEST["text1"];
        $obj->Text2 = $_REQUEST["text2"];
        $obj->Text3 = $_REQUEST["text3"];
        $obj->create();
        $obj->handleFileUploads();
        $obj->handleDropFileUploads($aDropFields[0], 'ImageUrl1');
        $obj->handleDropFileUploads($aDropFields[1], 'ImageUrl2');
        $obj->handleDropFileUploads($aDropFields[2], 'ImageUrl3');
        // redirect to listing list
        header("Location:soundtest_list.php?cat=" . $_REQUEST['cat'] . "&sound=" . $_REQUEST['sound']);
        exit;
    } else {
        // update
        $obj = new SoundTest($id);
        $obj->SoundTestDescription = $_REQUEST["sound_test_description"];
        $obj->SoundUrl1 = $_REQUEST["sound_url1"];
        $obj->SoundUrl2 = $_REQUEST["sound_url2"];
        $obj->SoundUrl3 = $_REQUEST["sound_url3"];
        $obj->Text1 = $_REQUEST["text1"];