I got a problem here on how to handle the form submission.
The problem is like this.I got two part of the form which i want to get the data from the user for the events that he/she want to promote.
(1)The first part is that I want the user of my website to be able to upload the picture regarding of his/her specific event.
(2)The other part is the user could submit the details about that particular events.
Thus, basically my sample coding in html and php will go like this :
This part is for handling the picture uploading :
<form action="http://localhost/inuevents/gallery" method="post" accept-charset="utf-8" enctype="multipart/form-data"> <input type="hidden" name="form_secret" id="form_secret" value="69b784ffe46267db33f577a89613bd67" /> <input type="file" name="userfile" value="" /><input type="submit" name="upload" value="Upload" /> </form> </div>
This part is for handling the events details (example only) :
<tr> <td class="request_form_td">Event's Name</td> <td> <input type="text" name="event_name" value="" class="sf_field" id="ename_field" /> </td> </tr> <tr> <td class="request_form_td">Date</td> <td><input type="text" name="date" value="" class="sf_field" id="date_field" /> </td> </tr>
Thus, how could I combine those two forms so that user only need to click one submit button only and both the details will be inserted into the database?
or if it is possible, how could i let the user first upload the picture by letting he/she clicking the upload button, and then fill in those other details.And only after that, the user could click submit and submit both of the data together.How could i achieve this?
Thank You for helping :)