I’m new here so I hope I am posting in the right place and thank you for such a great forum.
I created a form which I need to send to a CSV file. I need the form to send each submission to the csv file when “submit” is clicked. I need to have the CSV file accumulate the submissions which I will later analyze in Excel. I am trying to have a validation script which will send an error message if submit is clicked without a selection. If a selection is made and submitted I need the window to change into a separate thank you html file.
I have gotten this far and cant figure the rest out. I realize that this is a novice question and I am sorry to be a bother, but this would help me tremendously. I have spent the last 8 hours trying to figure this out in Dreamweaver and need help at this point. Thank you in advance.
The following is the script I have so far
<form action=”Activity.php” enctype=”text/plain” onSubmit=”location.href=’thank-you.html”_blank ” method=”POST”>
<LABEL>SELECT YOUR ACTIVITY:</LABEL>
<select name=”Activity” multiple=”multiple”size=”8.5″>
style=”font-family: calibri”
style=”color: #003399″
style=”border: outset”
style=”font-size: 7″
style=”background: white”>
<option value=”1″>Reactive Phone Call</option>
<option value=”2″>Proactive Phone Call</option>
<option value=”3″>Reactive Email</option>
<option value=”4″>Proactive Email</option>
<option value=”5″>Administrative</option>
<option value=”6″>Project/BOB Strategy</option>
<option value=”7″>Meeting</option>
<option value=”8″>Break/Lunch</option>
</select>
<input type=”submit” name=”Submit” value=”Submit” />
function write($name)
{
$fp = fopen(“mydata.csv” “a”);
fwrite($fp, $this->data);
fclose($data);
}
</form>