Here is a peice of test code that has the above problems.
pressing submit without selecting a file connects successfully, but if it actually uploads a file the connect fails.
<BODY>
<form method="post" action="import2.php3" enctype="multipart/form-data">
<input type="hidden" name="MAX_FILE_SIZE" value="10000000">
<input type="file" name="bkfile">
<input type="submit" name="bk_import" value="Import Bookmarks">
</form>
<?php
/ $Id: import2.php3 $ /
$dbh=mysql_connect("localhost","root","");
if ($dbh==TRUE) {
echo "TRUE";
} else {
echo "FALSE";
}
?>
</BODY>