Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<html>
<body>
<form method="POST" action="myPage2.asp">
Email Address: <input type="text" name="txtEmail" /><br/>
Would you liek me to email you? <input type="checkbox" name="chkEmail" value="yes" /><br/>
<input type="submit" value="Go!" />
</form>
</body>
</html>
<%
Option Explicit
'Do they want an email?
If Request.Form("chkEmail") <> "" Then
'is the email address filled in?
If Request.Form("txtEmail") = "" Then
'no email!
Response.Write "You didn't enter your email address and I can't read minds today, sorry."
Response.End
End If
'checked and address submitted, lets send it
'Copied From: [url=http://www.w3schools.com/asp/asp_send_email.asp] W3Schools.com[/url]
Set myMail=CreateObject("CDO.Message")
myMail.Subject="Sending email with CDO"
myMail.From="mymail@mydomain.com"
myMail.To=Request.Form("txtEmail")
myMail.TextBody="Hi There! This is me message to you! Thanks for checking my checkbox."
myMail.Send
set myMail=nothing
Response.Write "Your email has been sent."
Else
Response.Write "Since you didn't check the checkbox, I didn't email you. Thanks anyways."
End If
%>