multipart form and hidden fields
Posted on 2011-04-19
I have a multipart form that works fine as long as I'm not using it to upload a picture or an mp3. The moment that I do attempt to upload an mp3, the hidden fields on that form seem to be ignored by the code that follows.
Bottom line: I've got a select statement that looks like this:
$vivian = "select * from registration where id = '$_POST[contestant_id]'";
$vivian_query = mysqli_query($cxn, $vivian)
or die ("Couldn't execute query.");
//you're getting an error here. Check to see if you're getting the contestant's id
The $_POST[contestant_id] variable is a hidden field that shows up fine when you're not trying to upload an mp3. When you do have that kind of data in the form, the page fails because it doesn't see the $_POST[contestant_id] value.
Why? And, how can I fix it?