Form submission with file upload problems.
Posted on 2002-07-30
I have a basic page with a form. 1 text box.
<form name="all_events" action="test2.php" method="post">
<input type="text" name="Event_Name">
<input type="file" name="UPDF">
<input type="submit" value="submit">
When I submit to test2.php I get whatever was typed in the box.
Now, I need text1.php to upload a file. If I add enctype="multipart/form-data" to the form in text1.php, I get an error:
Warning: Undefined variable: Event_Name in /var/www/html/siteinasnap/test2.php on line 7
I have tested this and narrowed it down.
On servers with 4.0.6 it seems to work, at least on the ones I tried. On 4.1 and above, it doesn't seem to work. What changed or what can I look at so it works? Is there a setting to ensure that variables are read out of the querystring on a post? Do you need to read these variable s differently? I tried $_POST but it still doesn't think it's been defined.
When I change the type to get, everything works. I don't want to use get though.