/    Sign up×
Community /Pin to ProfileBookmark

I need form help

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>

to post a comment
PHP

3 Comments(s)

Copy linkTweet thisAlerts:
@sundip111Jun 27.2012 — No spam..

http://www.howtobecomeawebdeveloper.info/

Its a blog that provides everything related web developing..

Thanks
Copy linkTweet thisAlerts:
@BelrickJun 27.2012 — The issue as i see it is that you are not really asking a question.

What youre really asking is for someone to write all the code for you.

What youre trying to do is quite simple but times involved in writing.

Suggest you break it down into parts.

First part should be client side which is where you display the form, check the form has been filled in correctly using a client side language called javascript. Then on submit move to your php file which does the csv writing then says thankyou.

More than willing to help with specific questions!
Copy linkTweet thisAlerts:
@sawmanauthorJun 27.2012 — Both of your replies were extremely arrogant and unhelpful.

I take back my compliment about this site. I found a simple answer to my questions on another PHP forum which required 3 lines of code. I'm sure it was back breaking. :rolleyes:
×

Success!

Help @sawman spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.1,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...