I have the a page that takes information for a ticket, and i wish to add the functionality of an upload button for attachments. I have tried making this work but because of using multiple posts , this obviously won't work (at least with what i know).
Is there a way that i could create an upload file section (simple browse button etc) that when i click the submit button for the main form, the file gets uploaded at the same time.
I have also heard that it would be possible with AJAX. Does anybody know anything about AJAX at all and know if this would be a possibility.
I will post some of my code here for review - but i don't really have much as of now (the code posted below is for the upload functionality only - the file is pretty big with other stuff)
Basically my code here allows me to submit my ticket and the data is inserted correctly into my DB, but the upload file stuff does not work as expected. No files are uploaded at all. Any ideas? Mistake i have made in my code?
Thanks in advance