Adam Posted February 9, 2007 Share Posted February 9, 2007 Hi everyone, is there a way to upload files using PHP and AJAX? Anyway at all? - Thanks :: MODIFIED :: Quote Link to comment https://forums.phpfreaks.com/topic/37804-file-uploading/ Share on other sites More sharing options...
nloding Posted February 9, 2007 Share Posted February 9, 2007 You Ajax call would call the upload script, using either POST or GET. You upload script would just be a standard PHP file, doing whatever you want it to do with the file. Then you would have a div that you output the text to using the innerHTML DOM property. Two books are really, really helpful: Apress Beginning Ajax and PHP ... this helped me out a LOT! Also, Ajax For Dummies. Both were wonderful and helped me out a lot. If I knew more, I'd put some code here for you! Sorry I don't know more! Quote Link to comment https://forums.phpfreaks.com/topic/37804-file-uploading/#findComment-180881 Share on other sites More sharing options...
Adam Posted February 9, 2007 Author Share Posted February 9, 2007 I know how to use AJAX and PHP - And upload files the normal way. When i send the ajax though, how i send the file location (eg. C:\.....\myfile.ext), as it wouldn't register as a "FILE" object. - thanks Quote Link to comment https://forums.phpfreaks.com/topic/37804-file-uploading/#findComment-180886 Share on other sites More sharing options...
Jessica Posted February 9, 2007 Share Posted February 9, 2007 I've been stuck on this too. I can't figure out how to send a file via submitting a form via ajax, so if anyone can clarify that would be great. Quote Link to comment https://forums.phpfreaks.com/topic/37804-file-uploading/#findComment-180943 Share on other sites More sharing options...
nloding Posted February 12, 2007 Share Posted February 12, 2007 I haven't read this article yet, but I just found it ... maybe this will help. http://www.anyexample.com/programming/php/php_ajax_example__asynchronous_file_upload.xml Quote Link to comment https://forums.phpfreaks.com/topic/37804-file-uploading/#findComment-182362 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.