Search the Community
Showing results for tags 'verification'.
-
Hello! I am very new to coding, and need some help in getting javascript to verify whether a password has upper- and lowercase letters, and a number. I've already written a part where it checks if the password matches the second time you write it, but for the life of me I can't get the other shit to work. Here is what I have in the scripting department so far: { var password1 = document.getElementById('password1'); var password2 = document.getElementById('password2'); var message = document.getElementById('confirmMessage'); var goodColor = "#66cc66"; var badColor = "#ff6666"; if(password1.value == password2.value){ password2.style.backgroundColor = goodColor; message.style.color = goodColor; message.innerHTML = "Passwords Match!" }else{ password2.style.backgroundColor = badColor; message.style.color = badColor; message.innerHTML = "Passwords Do Not Match!" }
- 2 replies
-
- password
- verification
-
(and 3 more)
Tagged with:
-
Hi guys I am now current trying to implement Paypal sandbox in my website for testing. I used the form generated by Paypal and it worked. However, I wish to make it more secure by verifying the POST details against my database first before posting to Paypal. I have read on the internet for a few days and download a few sample codes to try out, however I still dun understand how it works. The thing I read on is IPN (Instant Payment Notification) for Paypal. Am I reading the right thing? If I am can anyone help me out cause I do not really understand part of it.
-
I have found an age verification code on the web. I would like to know if someone will help me to say what exact happens in the code? I'm kind a newbie to this and would like to know how it all works before I use it. Here comes the code. verify.php (page that will serve as the yes / no to the user) <?php session_start(); if ($_SERVER['REQUEST_METHOD'] == 'POST') { if (isset($_POST['YES'])) { $redirect = isset($_GET['return']) ? urldecode($_GET['return']) : './'; $expire = isset($_GET['x']) && is_numeric($_GET['x']) ? intval($_GET['x']) : -1; if ($expire == - 1) { $_SESSION['verified'] = "yes"; header("location: " . $redirect); exit(0); } if ($expire == 0) { setcookie("verified", "yes", mktime(0, 0, 0, 01, 01, date("Y") + 30)); $_SESSION['verified'] = "yes"; header("location: " . $redirect); exit(0); } setcookie("verified", "yes", (time() + $expire)); $_SESSION['verified'] = "yes"; header("location: " . $redirect); exit(0); } else { header("location: http://www.youtube.com/watch?v=gppbrYIcR80"); exit(0); } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title> Alcohol Age Verification Example Page </title> <link href="style.css" type="text/css" rel="stylesheet" /> </head> <body> <form action="" method="POST"> <p id="textVerify"> PLEASE VERIFY THAT YOU ARE OVER AGE 21 BEFORE ENTERING THIS SITE </p> <input name="NO" id="no" type="Submit" value="NO - Leave" /> <input name="YES" id="yes" type="Submit" value="Yes - Enter" /> </form> </body> </html> add to existing pages (at the top of each .html or .php page in your site,) <?php function verified(){ $redirect_url = 'http://www.YOURSITEROOT.com/verify.php'; $expires = - 1; session_start(); $validated = false; if (!empty($_COOKIE["verified"])) { $validated = true; } if (!$validated && isset($_SESSION['verified'])) { $validated = true; } if (is_numeric($expires) && $expires == - 1 && !isset($_SESSION['verified'])) { $validated = false; } if ($validated) { return; } else { $redirect_url = $redirect_url . "?return=" . $_SERVER['REQUEST_URI'] . "&x=" . $expires; Header('Location: ' . $redirect_url); exit(0); } } verified(); ?>
- 4 replies
-
- php
- verification
-
(and 1 more)
Tagged with: