Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include 'dbconnect.php';
- if(isset($_POST['username'])) {
- $key = '6LfjXCITAAAAALsTlmkF2yUBM4dzr7SSsD3wPhNf';
- $url = 'https://www.google.com/recaptcha/api/siteverify';
- $response = file_get_contents($url . "?secret=" . $key . "&response=" . $_POST['g-recaptcha-response'] . "&remoteip=" . $_SERVER['REMOTE_ADDR']);
- $data = json_decode($response);
- if(isset($data->success) AND $data->success==true) {
- $username = strip_tags($_POST['username']);
- $password = md5(strip_tags($_POST['pass']));
- $email = strip_tags($_POST['email']);
- $bd = $_POST['birthday'];
- $sql = $dbCon->query("INSERT INTO members(username, password, email, birthday) Values('{$username}','{$password}','{$email}','{$bd}')");
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement