<?php 
$error = 0;
$error_msg = array();
$consultants = new Consultants();
$validations = new Validations();
if (isset($_POST['submit'])) {
    if (!$validations->stringCheck($_POST['firstname'])) {
        $error++;
        $error_msg[] = 'Please check firstname!';
    }
    if (!$validations->stringCheck($_POST['lastname'])) {
        $error++;
        $error_msg[] = 'Please check lastname!';
    }
    if (!$validations->emailCheck($_POST['email'])) {
        $error++;
        $error_msg[] = 'Please check email!';
    }
    if ($consultants->isUsernameExist($_POST['email'])) {
        $error++;
        $error_msg[] = 'Email already exists!';
    }
}
if (isset($_POST['submit']) && $error == 0) {
    if ($consultants->addUser()) {
        echo 'Successfully Added!';
        //var_dump($_POST['category']);
    }
} else {
    if ($error > 0) {
<?php

//echo '<pre>'.print_r( wp_get_nav_menu_items( 2 ) ,1).'</pre>';
?>
<!DOCTYPE html>

<?php 
$consultants = new Consultants();
$validations = new Validations();
if (isset($_POST['submit'])) {
    if (!$validations->emailCheck($_POST['username'])) {
        $error++;
        $error_msg = 'Wrong username/password!';
    }
    if (!$consultants->loginUser($_POST['username'], $_POST['password'])) {
        $error++;
        $error_msg = 'Wrong username/password!';
        $showlogin = '******';
    }
}
?>
<html lang="en-US" class="css3transitions">
<html <?php 
language_attributes();
?>
>
<head>