I am facing an issue with my website. Currently, when a user submits an application form, an email is sent. However, I would like to create a CSV file containing the form data and then automatically populate my database using this CSV file.
Here is my ASP form:
<div class="submit">
<div class="left">
<div class="field"><input id="inputFirstname" type="text" value="First name *" class="watermark" name="firstname"/></div>
<div class="field"><input id="inputLastname" type="text" value="Last name *" class="watermark" name="lastname"/></div>
<div class="field"><input id="inputEmail" type="text" value="E-mail *" class="watermark" name="email"/></div>
<div class="fieldradio" style="margin-bottom:10px;">
<label class="watermark" style="display:inline">Gender *</label>
<input id="inputGenderM" class="watermark" style="display:inline;width: 10px" name="gender" type="radio" />
<label class="watermark" style="display:inline">M</label>
<input id="inputGenderF" class="watermark" style="display:inline;width: 10px" name="gender" type="radio" />
<label class="watermark" style="display:inline">F</label>
</div>
</div>
<div class="right">
<div class="textarea"><textarea id="inputMessage" name="message" class="watermark">Add your message here</textarea></div>
<div style="float:left;width:100%; margin-top:30px;">
<div id="captchadiv"><input id="captchaInput" type="text" value="Enter validation text *" name="captchaInput" class="watermark" style="margin-top:10px;"/></div>
</div>
<div class="clear"></div>
<div class="submit_container" id="submitArea">
<a onclick="javascript:submitCV();" class="btn orange height_19 submit"><span>
SEND FORM</span></a>
</div>
</div>
The JavaScript function "submitCV()":
$(document).ready(
function(){
$.getJSON('http://jsonip.appspot.com/?callback=?',
function(data){
clientIP = data.ip;
});
function submitCV() {
// Validation code
}
function submitSucceeded(result) {
// Success handling code
}
function submitFailed(error) {
// Error handling code
}
Is there a quick way to implement creating a CSV file for storage? What do you suggest?
Additionally, I would like to know how to automatically populate an Access database with each new CSV file. Would a Unix script or VB be suitable for this task if the CSV files are stored in an FTP folder?