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? Link to comment https://forums.phpfreaks.com/topic/99880-picture-upload/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.