$messageres]; echo json_encode($generateresp); } else { header("Location: ../login.php"); } ?>