Your IP : 216.73.217.87


Current Path : /hdd/hdd11/www/vlevski/test/
Upload File :
Current File : /hdd/hdd11/www/vlevski/test/add.php

<?php

include 'includes/common.php';

if (isset($_POST['username']) && isset($_POST['email']) && isset($_POST['password'])) {
    $username = sanitize($_POST['username']);
    $email = sanitize($_POST['email']);
    $password = sanitize($_POST['password']);

    if (strlen($username) > 0 && strlen($email) > 0 && strlen($password) > 0) {
        $users = new Users();
        if ($users->addUser($username, $email, $password)) {
            print 'ok';
        } else {
            print 'err';
        }
    } else {
        print 'err';
    }
}