iochinome Posted April 6, 2008 Share Posted April 6, 2008 hey guys i am doing a file upload thing for my site where people can upload pictures and i show them. i made the whole form thing, had it pass on to the action page by the post method, then i access it right, with the whole $_FILE thing, but for some reason, sometimes it takes an incredibly long time to upload and fails to upload the file. here is the code: $target_path = "pictures/"; $target_path = $target_path . basename($_FILES['photo']['name']); if (move_uploaded_file($_FILES['photo']['tmp_name'], $target_path)) { $SRC = $target_path; $DESCRIPTION = $_POST['description']; mysql_query("INSERT INTO pictures (USERNAME, DESCRIPTION, SRC) VALUES ('$USERNAME','$DESCRIPTION','$SRC')"); ?> <h1 align="center">[uPLOADED SUCCESSFULLY]</h1> <?PHP } else { ?> <h1 align="center">[ERROR]</h1> <?PHP }?> <br> <br> anybody know what i am doing wrong? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.