Skip to content

Instantly share code, notes, and snippets.

@amanbatra5
Created July 8, 2020 18:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amanbatra5/b5eaa15a38996c25e6a20fb7fe1ccd3f to your computer and use it in GitHub Desktop.
Save amanbatra5/b5eaa15a38996c25e6a20fb7fe1ccd3f to your computer and use it in GitHub Desktop.
Ampscript Login Page:
%%[
set @username = RequestParameter('username')
set @password = RequestParameter('password')
if RequestParameter("submitted") == "submitted" then
if @username == "scholarship-user" and @password == "scholarship-pass" then
Redirect("https://pub.s10.exacttarget.com/qajsj2sf3mq")
endif
]%%
<script>
alert("Incorrect username or password!");
</script>
%%[
endif
]%%
<h2>Login Form</h2>
<form action="" method="post">
<div class="imgcontainer">
<img src="https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png (https://www.salesforceben.com/wp-content/uploads/2015/09/THEDRIP_banner_new-1.png)" alt="Avatar" class="avatar">
</div>
<div class="container">
<label for="uname"><b>Username</b></label>
<input type="text" placeholder="Enter Username" name="username" required="">
<label for="psw"><b>Password</b></label>
<input type="password" placeholder="Enter Password" name="password" required="">
<input id="submitted" type="hidden" name="submitted" value="submitted">
<button type="submit">Login</button>
</div>
<div class="container" style="background-color:#f1f1f1">
<button type="button" class="cancelbtn">Cancel</button>
<span class="psw">Forgot <a href="#">password?</a></span>
</div>
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment