File upload or insert URL - two form fields to one DB column
Hi Ray, I have a DA insert page where I need to give the option of either uploading a file or allowing the user to manually input a URL. I thought it would be a simple case of adding a text input, file upload field and writing both to the same DB column, however it seems to only run the first one in the Insert behavior. This is the code I used:
$InsertQuery->bindColumn("Link", "s", "".($WA_DFP_UploadStatus["WA_UploadResult1"]["serverFileName"]) ."", "WA_SKIP");
$InsertQuery->bindColumn("Link", "s", "".((isset($_POST["Link"]))?$_POST["Link"]:"") ."", "WA_SKIP");
Originally I had both set to be blank if empty and I thought that might have been the problem so changed them to skip if empty but hasn't made any difference.