0

Hi there

I'd just like to know if this is possible. I have a form with various fields that are filled out by a user along with a captcha and a file input. My problem is that when ever I execute the form the file is uploaded to the server before the captcha has been verified. So a user ends up waiting for the file to upload only to find out after his 10meg file has been uploaded that he entered the captcha code incorrectly (file stays in server temp folder if captcha is incorrect).

So what I want to do is have a form tag around my table with the fields and then have a form tag around the file input only and when the user hits submit it checks the captcha, then refers to the file and uploads it if the captcha is correct.

2
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by Venom Rush
0

What you could do is modify the onsubmit property of the form to send an AJAX request to validate the CAPTCHA, if that validates then return true(submit the form), or return false(cancels the submit)

0

Hey Shawn

Thanks for the response. Looking at a security point of view would using ajax not be subject to being worked around to ignore the captcha check and simply upload a file?

0

I've been doing some googling and I've come across some solutions that use fsockopen. The problem is that in all these solutions the "coder" knows what the file is they'd like to upload.

Is there anyone here that's used fsockopen for uploading files that can help me?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.