469,898 Members | 2,400 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,898 developers. It's quick & easy.

send email when condition it met

I have a form that stores information in a table, but I also need it
to send an email when a specific question, among the many, is answered
with no

the question is a simple drop box:

<select name="safe_access">
<option value="0"></option>
<option value="yes">Yes</option>
<option value="no">No</option>
</select>

and the javascript validation is:

//safe_access
if ( form.safe_access.selectedIndex == 0 ){
alert ( "Please select whether or not there is safe access to the
beach." );
form.safe_access.focus();
return false;
}

how do I get it to send an email, and still store information in the
table when someone answers no?

I've done several searches, but they all keep bringing up how to email
the form instead of what I am looking for.

Thanks
Mar 18 '08 #1
5 2078
On Mar 18, 1:22 pm, "canaj...@gmail.com" <canaj...@gmail.comwrote:
I have a form that stores information in a table, but I also need it
to send an email when a specific question, among the many, is answered
with no

the question is a simple drop box:

<select name="safe_access">
<option value="0"></option>
<option value="yes">Yes</option>
<option value="no">No</option>
</select>

and the javascript validation is:

//safe_access
if ( form.safe_access.selectedIndex == 0 ){
alert ( "Please select whether or not there is safe access to the
beach." );
form.safe_access.focus();
return false;

}

how do I get it to send an email, and still store information in the
table when someone answers no?

I've done several searches, but they all keep bringing up how to email
the form instead of what I am looking for.

Thanks
Do you intend to store the data in the table AND send email via
javascript?
Or do you have some server-side script to do it for you?
Mar 18 '08 #2
On Mar 18, 9:31 am, GArlington <garling...@tiscali.co.ukwrote:
On Mar 18, 1:22 pm, "canaj...@gmail.com" <canaj...@gmail.comwrote:
I have a form that stores information in a table, but I also need it
to send an email when a specific question, among the many, is answered
with no
the question is a simple drop box:
<select name="safe_access">
<option value="0"></option>
<option value="yes">Yes</option>
<option value="no">No</option>
</select>
and the javascript validation is:
//safe_access
if ( form.safe_access.selectedIndex == 0 ){
alert ( "Please select whether or not there is safe access to the
beach." );
form.safe_access.focus();
return false;
}
how do I get it to send an email, and still store information in the
table when someone answers no?
I've done several searches, but they all keep bringing up how to email
the form instead of what I am looking for.
Thanks

Do you intend to store the data in the table AND send email via
javascript?
Or do you have some server-side script to do it for you?
right now the form action sends the information to a php script which
stores the information in the table:

<form action="thankyou.php" method="post" name="form" id="form">
Mar 18 '08 #3
On Mar 18, 9:31 am, GArlington <garling...@tiscali.co.ukwrote:
On Mar 18, 1:22 pm, "canaj...@gmail.com" <canaj...@gmail.comwrote:
I have a form that stores information in a table, but I also need it
to send an email when a specific question, among the many, is answered
with no
the question is a simple drop box:
<select name="safe_access">
<option value="0"></option>
<option value="yes">Yes</option>
<option value="no">No</option>
</select>
and the javascript validation is:
//safe_access
if ( form.safe_access.selectedIndex == 0 ){
alert ( "Please select whether or not there is safe access to the
beach." );
form.safe_access.focus();
return false;
}
how do I get it to send an email, and still store information in the
table when someone answers no?
I've done several searches, but they all keep bringing up how to email
the form instead of what I am looking for.
Thanks

Do you intend to store the data in the table AND send email via
javascript?
Or do you have some server-side script to do it for you?
right now the form action sends the information to a php script which
stores the information in the table:

<form action="thankyou.php" method="post" name="form" id="form">
Mar 18 '08 #4
On Mar 18, 1:51 pm, "canaj...@gmail.com" <canaj...@gmail.comwrote:
On Mar 18, 9:31 am, GArlington <garling...@tiscali.co.ukwrote:
On Mar 18, 1:22 pm, "canaj...@gmail.com" <canaj...@gmail.comwrote:
I have a form that stores information in a table, but I also need it
to send an email when a specific question, among the many, is answered
with no
the question is a simple drop box:
<select name="safe_access">
<option value="0"></option>
<option value="yes">Yes</option>
<option value="no">No</option>
</select>
and the javascript validation is:
//safe_access
if ( form.safe_access.selectedIndex == 0 ){
alert ( "Please select whether or not there is safe access to the
beach." );
form.safe_access.focus();
return false;
}
how do I get it to send an email, and still store information in the
table when someone answers no?
I've done several searches, but they all keep bringing up how to email
the form instead of what I am looking for.
Thanks
Do you intend to store the data in the table AND send email via
javascript?
Or do you have some server-side script to do it for you?

right now the form action sends the information to a php script which
stores the information in the table:

<form action="thankyou.php" method="post" name="form" id="form">
This question that may be answered "yes" or "no", and you want to act
when the answer is "NO",
it is NOT to the tune of "Do you want to subscribe to our newsletter
(and other unsolicited mail)?"
Is it?
Mar 18 '08 #5
On Mar 18, 12:52 pm, GArlington <garling...@tiscali.co.ukwrote:
On Mar 18, 1:51 pm, "canaj...@gmail.com" <canaj...@gmail.comwrote:
On Mar 18, 9:31 am, GArlington <garling...@tiscali.co.ukwrote:
On Mar 18, 1:22 pm, "canaj...@gmail.com" <canaj...@gmail.comwrote:
I have a form that stores information in a table, but I also need it
to send an email when a specific question, among the many, is answered
with no
the question is a simple drop box:
<select name="safe_access">
<option value="0"></option>
<option value="yes">Yes</option>
<option value="no">No</option>
</select>
and the javascript validation is:
//safe_access
if ( form.safe_access.selectedIndex == 0 ){
alert ( "Please select whether or not there is safe access to the
beach." );
form.safe_access.focus();
return false;
}
how do I get it to send an email, and still store information in the
table when someone answers no?
I've done several searches, but they all keep bringing up how to email
the form instead of what I am looking for.
Thanks
Do you intend to store the data in the table AND send email via
javascript?
Or do you have some server-side script to do it for you?
right now the form action sends the information to a php script which
stores the information in the table:
<form action="thankyou.php" method="post" name="form" id="form">

This question that may be answered "yes" or "no", and you want to act
when the answer is "NO",
it is NOT to the tune of "Do you want to subscribe to our newsletter
(and other unsolicited mail)?"
Is it?
the question is actually:

Is there safe access? (yes/no)

it's one of many questions, but if the answer to this one is no than
an email needs to be sent to another person alerting them of the
problem ASAP instead of waiting for them to look at all the answers at
a later time, the person filling out the form isn't asked for their
email
Mar 18 '08 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

15 posts views Thread by news.microsoft.com | last post: by
1 post views Thread by Danny | last post: by
9 posts views Thread by Mahernoz | last post: by
reply views Thread by canajien | last post: by
1 post views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.