PHP

PHP & MYSQL Website Development

Hey, I am working on a php website and I am using mysql as the database of the site. I am currently using MAMP to setup my localhost server. The problem is when I uploaded my website to Siteground hosting features like the login page isn't working. The redirects using header() for example { if login failed do... header("Location: login.php?res=1"); } doesn't pass the parameter res=1 also when valid login credentials are used the site gives a blank page. On my localhost everything works fine and as expected also on my actual website on siteground the signup page functions properly so i don't know what the problem is.

Please help me fix this issue.

The code used to check

if ($_SERVER['REQUEST_METHOD'] == "POST") { $email = trim(filter_input(INPUT_POST,'login_email',FILTER_SANITIZE_EMAIL)); $password = trim(filter_input(INPUT_POST,'login_password',FILTER_SANITIZE_STRING)); $_SESSION['used_email'] = $email; $_SESSION['login_failed'] = "no"; if (empty($email) || empty($password)) { $err_msg = "Please fill in the required fields!"; } else { if (log_user_in($email,$password)) { $_SESSION['lis'] = encrypt_text(true); echo($_SESSION['cu']) . "<br>\n"; echo($_SESSION['lis']); header("Location: home.php"); exit; } else { header("Location: login.php?res=1"); }

}

}

The functions used are coded in different files placed in different folders but included in this (login.php) page