<% dim sendemails,msg sendemails=-1 msg="" if Request("save")<>"" then ' we have entered this script after a "save" click, so keep enail address from form and update DB email=Request("email") ' set 'sendemails' from check box settings if Request("sendEmail1")="on" then sendemails=1 else sendemails=0 ' now update DB dim Conn, SQL, RS Set Conn = Server.CreateObject("ADODB.Connection") Conn.Open "Driver={MySQL};DATABASE=consultdb; UID=consult;PASSWORD=jemima64" SQL="UPDATE Users SET sendEmails='" & sendemails & "' WHERE userName='" & Session("User") & "'" Set RS = Conn.Execute(SQL) 'RS.Close Conn.Close ' user message - printed at end of page msg="

Your settings have been saved." end if %> <% if Session("User")&""="" then %> <% else ' stuff which is only for logged on users if sendemails=-1 then ' need to get email address & sendemails status from DB Set Conn = Server.CreateObject("ADODB.Connection") Conn.Open "Driver={MySQL};DATABASE=consultdb; UID=consult;PASSWORD=jemima64" ' get info about userName SQL="SELECT * FROM Users WHERE userName='" & Session("User") & "'" set RS=Conn.Execute(SQL) email=RS("email") sendemails=RS("sendEmails") RS.Close Conn.Close end if %> <% end if %>
eLuach can send you regular emails.
You must register and login to get emails.
Register/Login
Our record of your email address is <%= email %>
To change it, please change profile

Please specify which emails you want to receive.

>Daily zmanim

<% Response.write(msg) %>