Skip to content

Instantly share code, notes, and snippets.

@zuzannamj
Created March 9, 2023 16:54
Show Gist options
  • Save zuzannamj/3f046a780a657103defe9c0412d19159 to your computer and use it in GitHub Desktop.
Save zuzannamj/3f046a780a657103defe9c0412d19159 to your computer and use it in GitHub Desktop.
%%[
ELSEIF RequestParameter("submittedOTP") == true THEN
SET @OTP = RequestParameter('OTP')
SET @email = RequestParameter("email")
/* check OTP against the DE */
set @rows = LookupOrderedRows("OTP", 1, "SentDate desc", "EmailAddress", @email)
if @rowCount > 0 then
set @row = row(@rows, 1)
set @deOTP = field(@row,"OTP")
endif
if @otp == @deOTP then
]%%
OTP verified
%%[ else ]%%
OTP not vverified
%%[ endif ]%%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment