SyntaxFix
Write A Post
Hire A Developer
Questions
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 }