Hi,
I have a piece of code above the head section of my asp page that sends a
text message when the page is submitted.
What I need is a checkbox that can switch off the code when no text message
is to be sent.
Any ideas anyone please? Code below.
Thanks in advance
Simon
' Sending SMS
'Dim sUrl
' Dim sAPI_ID, sPassword, sUsername, sMobileNo, sText
' Dim oXMLHTTP, sPostData, sResult
'
' sUrl = "http://xxxxxxxxxx"
' sAPI_ID = "xxxxxxx"
' sPassword = "xxxxxx"
' sUsername = "xxxxxxxxx"
' sMobileNo = "" & rsBooking.Fields("MOBILE_NO").Value
' sText = "Message: " & rsBooking.Fields("Message").Value & vbcrlf &
"Driver Name: " & rsBooking.Fields("DRIVER_NAME").Value & vbcrlf & _
' "Driver Mobile No: " &
rsBooking.Fields("DRIVER_MOBILE").Value & vbcrlf & "Vehicle: " &
rsBooking.Fields("DRIVER_VEHICLE").Value & vbcrlf & _
' "Registration: " & rsBooking.Fields("VEHICLE_REG").Value
' sPostData = "api_id=" & sAPI_ID
' sPostData = sPostData & "&user=" & sUsername
' sPostData = sPostData & "&password=" & sPassword
' sPostData = sPostData & "&to=" & sMobileNo
' sPostData = sPostData & "&text=" & sText
' Set oXMLHTTP = Server.CreateObject("Microsoft.XMLHTTP")
'
' oXMLHTTP.Open "POST", sUrl, false
' oXMLHTTP.SetRequestHeader "Content-Type",
"application/x-www-form-urlencoded"
' oXMLHTTP.Send sPostData
'
' sResult = oXMLHTTP.responseText
' Set oXMLHTTP = NOTHING
' Response.Write("result=" & sResult & "&")