if (isset($_POST['add_form'])) { if (!is_dir("Forms")) { mkdir("Forms"); } else { if (isset($_FILES['file'])) { $dir = "Forms/{$_FILES['file']['name']}"; if (move_uploaded_file($_FILES['file']['tmp_name'], $dir)) { add_form($_POST['upload_date'], $_POST['form_name'], $dir); } else { if (copy($_FILES['file']['tmp_name'], $dir)) { add_form($_POST['upload_date'], $_POST['form_name'], $dir); } else print "YOU GOT AN ERROR."; } } else if (isset($_POST['form_url'])) { add_form($_POST['upload_date'], $_POST['form_name'], $_POST['form_url']); } } }I ALWAYS end up in the "YOU GOT AN ERROR." part.
I've done everything I can to make this work, but I just don't know anymore.
The form does have "enctype="multipart/form-data"" in case you're wondering.
Thanks,
rawrstin