Insert into two tables during user registration using PHP
You should return early to reduce nesting and make it more obvious when what values are returned:

if (!$stmt = $mysqli-&gt;prepare("INSERT INTO users (username, email, regtime, emailverified, type) values (?,?,?,?,?);")) {
    echo "uh oh";
}
[...]

if($stmt-&gt;bind_param('sssii', $username, $email, $dateStr, $emailverified, $type) !== true){
    // you actually didn't have an else for this
}
[etc]


You should also replace your echoes with exceptions with proper error messages.

Misc


your indentation is off, and you should use a minimum of 4 spaces.
rc is not a good variable name, and you shouldn't reuse variables for different things.
you should also extract this into two functions: insertUser($username, $email, ...) and insertUserCredentials($username, $hash).