ASP code - cover up credit card #'s

D

Dani

We currently have an online form that customers fill out to buy one of our
products. After they submit it, it sends them an email containing all the
order information including the credit card #. It currently sends the
entire # which we would like to change to xxxx-xxxx-xxxx-1234. Does anyone
know how to do this? I don't know asp well enough to know how to change
cardno to use the x's instead of the actual #. The current code is:
If cardno <> "" then

strHTML = strHTML & "<B>You have chosen to pay with the following Credit
Card:</B><br>"

strHTML = strHTML & "<B>Card Type :"&"<font style = 'color:#0000FF'>" & CC &
"</font></B><br>"

strHTML = strHTML & "<B>Card Number :"&"<font style = 'color:#0000FF'>" &
cardno & "</font></B><br>"

strHTML = strHTML & "<B>Expiration Date :"&"<font style = 'color:#0000FF'>"
& expiremonth & "," & " " & expireyear & "</font></B><br>"

Thanks for your help!
 
O

Oenone

Dani said:
strHTML = strHTML & "<B>Card Number :"&"<font style =
'color:#0000FF'>" & cardno & "</font></B><br>"

How about:

\\\
strHTML = strHTML & "<B>Card Number :<font style =
'color:#0000ff'>xxxx-xxxx-xxxx" & Right(cardno,4) &"</font></B><br>"
///
 
D

Dani

That did the trick. Thanks so much!

Oenone said:
How about:

\\\
strHTML = strHTML & "<B>Card Number :<font style =
'color:#0000ff'>xxxx-xxxx-xxxx" & Right(cardno,4) &"</font></B><br>"
///
 
R

Robert Smith

strHTML = strHTML & "<B>Card Number :"&"<font style = 'color:#0000FF'>" &
cardno & "</font></B><br>"

strHTML = strHTML & "<B>Expiration Date :"&"<font style = 'color:#0000FF'>"
& expiremonth & "," & " " & expireyear & "</font></B><br>"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top