[thelist] PHP and file uploads
Beau Hartshorne
beau at members.evolt.org
Sat Mar 2 19:57:00 CST 2002
Check this out:
enctype.php
===========
<html>
<form action="enctype.php" enctype="multipart/form-data" method="post">
Input your name: <input name="name" type="text" /><br> Upload a file:
<input name="userfile" type="file" /><br> <input type="submit"
name="submit" value="submit" /> </form> <p><?php if (isset($name)) {
echo "name is set: " . $name . "<br />";
}
if (isset($submit)) {
echo "submit is set: " . $submit . "<br />";
}
if (isset($userfile)) {
echo "uploaded_file is set: " . $userfile_size;
}
?></p>
</html>
no_enctype.php
==============
<html>
<form action="no_enctype.php" method="post">
Input your name: <input name="name" type="text" /><br>
Upload a file: <input name="userfile" type="file" /><br>
<input type="submit" name="submit" value="submit" />
</form>
<p><?php
if (isset($name)) {
echo "name is set: " . $name . "<br />";
}
if (isset($submit)) {
echo "submit is set: " . $submit . "<br />";
}
if (isset($uploaded_file)) {
echo "userfile is set: " . $userfile_size;
}
?></p>
</html>
So.
This code works as expected on my meo account:
http://members.evolt.org/beau/enctype.php
http://members.evolt.org/beau/no_enctype.php
But take a look on my client's server:
http://216.194.83.93/enctype.php
http://216.194.83.93/no_enctype.php
I don't even get any error messages -- when the enctype attribute is set
(in the <form> tag), nothing from the form gets posted.
Does anyone have any ideas?? Has anyone ever seen this before?
Thanks,
Beau
More information about the thelist
mailing list