name = $_POST['name']; $hashPass = password_hash($_POST['password'], PASSWORD_DEFAULT); $user->password = $hashPass; if(!$user->save()){ echo "Error"; }else{ echo "saved"; } //}