I want to place both register and login form on the same page. They both starts with:
if (!empty($_POST)) ...
so, I need something l
Hope this will help you. Assumed that login form has: username and password inputs.
if(isset($_POST['username']) && trim($_POST['username']) != "" && isset($_POST['password']) && trim($_POST['password']) != ""){ //login } else { //register }