Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %%[
- SET @submit = RequestParameter("submit")
- IF @submit == 1 THEN
- SET @user = RequestParameter("username")
- SET @pass = RequestParameter("password")
- SET @lookup = LookupRows(@yourDE, "Username", @user, "Password", @pass
- SET @valid = Rowcount(@lookup)
- ELSE
- SET @valid = 0
- ENDIF
- IF @submit == 1 AND @valid > 0 THEN
- ]%%
- <p>You are now logged in and will be taken to your page</p>
- %%[
- ELSEIF @Submit == 1 AND (@valid == 0 OR EMPTY(@valid)) THEN
- ]%%
- <p>Your Username or Password was incorrect. Please click <a href="%%=RedirectTo(CloudPagesURL({{yourCloudPageID}}"))=%%">here</a> to try again.</p>
- %%[
- ELSE
- ]%%
- <form action="%%=RedirectTo(CloudPagesURL("{{yourCloudPageID}}"))=%%">
- UserName:<br>
- <input type="hidden" name="submit" value="1" />
- <input type="text" name="username" value=""><br>
- Password:<br>
- <input type="text" name="password" value=""><br><br>
- <input type="submit" value="Submit">
- </form>
- %%[
- ENDIF
- ]%%
Add Comment
Please, Sign In to add comment