I would like to request help on my code. Hope you understand my question.
This form will be shared public / social media
I created a cloud page with amp script.
Values on my smart capture are EMAIL (Primary Key), NAME and MOBILE.
My data extension name is 'Test_0930_Email' in which the answers are collected from my cloud page form. Values on my data extension are EMAIL, NAME and MOBILE
What I want is every time they answer AGAIN (using the same email address) from the form they will be redirected to a link (https://via.placeholder.com/300x300.png?text=SAMPLE).
Important Note: If they answer using a DIFFERENT EMAIL (Primary Key) the form will SUBMIT
If they answer the form again with the SAME EMAIL (Primary Key), it will redirect to https://via.placeholder.com/300x300.png?text=SAMPLE
Is the solution possible using amp script only? if yes, please help me fix my code.
My Amp script in Cloudpage:
%%[
Var @EMAIL, @NAME, @MOBILE, @STATUS
Set @EMAIL= RequestParameter ('EMAIL')
Set @NAME= RequestParameter ('NAME')
Set @MOBILE= RequestParameter ('MOBILE')
SET @STATUS = Lookup('Test_0930_Email', 'EMAIL', @EMAIL)
IF @STATUS == "NOT EMPTY" THEN
%%=Redirect('https://via.placeholder.com/300x300.png?text=SAMPLE')=%%
ENDIF
]%%