error checking
if(!$result) {
     error_log("[SQL] : existing email check : ".mysqli_error($result));
     header('Location: ../dashboard/?error=true');
}