<?php
// put the posted username and password into variables
$username = $_REQUEST['username'];
$password = $_REQUEST['password'];
// if the username and password has been left blank
if ($username == 'test' && $password == 'test') {
$json_string = '{"message":"<strong>Login Successful!</strong>","successful":"Y"}';
echo $json_string;
}
else {
$json_string = '{"message":"<strong>Login failed! Please enter your email address and password.</strong>","successful":"N"}';
echo $json_string;
}
?>
Add a code snippet to your website: www.paste.org