forcom Posted June 15, 2009 Share Posted June 15, 2009 How can I upload a file to images/vpimages/upimages I want it to upload and create a folder when it upload. Quote Link to comment https://forums.phpfreaks.com/topic/162240-solved-upload-file/ Share on other sites More sharing options...
jxrd Posted June 15, 2009 Share Posted June 15, 2009 http://www.google.co.uk/search?q=php+file+upload&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-GB:official&client=firefox-a Quote Link to comment https://forums.phpfreaks.com/topic/162240-solved-upload-file/#findComment-856273 Share on other sites More sharing options...
forcom Posted June 15, 2009 Author Share Posted June 15, 2009 http://www.tizag.com/phpT/fileupload.php Ok what am I doing wrong here. I followed everything but I am receiving error Parse error: syntax error, unexpected ';' in \\table.php on line 243 <form enctype="multipart/form-data" action="vptable.php" method="POST"> <input type="hidden" name="MAX_FILE_SIZE" value="100000" /> Choose a file to upload: <input name="uploadedfile" type="file" /><br /> <input type="submit" value="Upload File" /> </form> <?php //location of uploaded images $target_path="images/vpimages/upimages/"; $target_path =$target_path.basename($_FILE['uploadedfile']['name']; if (move_uploaded_file($_FILE['uploadedfile']['temp_name'], $target_path)){ echo"The file ". basename($_FILE['uploadefile']['name']). " has been uploaded";} else { echo "There was an error uploading file, Please try again!"; } Quote Link to comment https://forums.phpfreaks.com/topic/162240-solved-upload-file/#findComment-856592 Share on other sites More sharing options...
MadTechie Posted June 15, 2009 Share Posted June 15, 2009 $target_path =$target_path.basename($_FILE['uploadedfile']['name']; should be $target_path =$target_path.basename($_FILE['uploadedfile']['name']); Quote Link to comment https://forums.phpfreaks.com/topic/162240-solved-upload-file/#findComment-856636 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.