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
You could make two forms with 2 different actions
Or do this
Then you PHP file would work as a switch($_POST['action']) ... furthermore, they can't click on both links at the same time or make a simultaneous request, each submit is a separate request.
Your PHP would then go on with the switch logic or have different php files doing a login procedure then a registration procedure