killboy Posted December 22, 2008 Share Posted December 22, 2008 Hi there.Anyone knows how to upload a file via PHP and AJAX??Thanks. Link to comment Share on other sites More sharing options...
jeffman Posted December 22, 2008 Share Posted December 22, 2008 As far as I know, it cannot be done, for security reasons. You can imitate the effect (it runs in the background and doesn't refresh the page) if you handle the heavy lifting in a hidden iFrame. So, yeah, that kind of makes it a hack, but a harmless one.Google these words: file upload iframeNotice how many hits come up with the word AJAX in the title. Link to comment Share on other sites More sharing options...
Wander Posted December 22, 2008 Share Posted December 22, 2008 I don't think this is possible, as far as I know the ajax-looking file uploads (like in gmail), work with iframesedit - see Deirdre's Dad's post, guess i was a bit slow with posting Link to comment Share on other sites More sharing options...
Anman Posted December 22, 2008 Share Posted December 22, 2008 You can easily upload files in PHP only.. Link to comment Share on other sites More sharing options...
killboy Posted December 22, 2008 Author Share Posted December 22, 2008 Yeah, but I don't want the script to take me to the upload page and then take it to the previous one.OK guys, thanks for the reply.IFrames work OK. I was capable of doing what I needed. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.