How to include a second file when clicked a link on already included file?

StackOverflow https://stackoverflow.com/questions/14513281

  •  17-01-2022
  •  | 
  •  

I have included my index_login.php (the file with login form on it) to my index.php, and when I click to [Log In] it goes to login.php ( the file with checking if user exist and if exist says welcome etc.) but I want to make all login related files to be included in my index.php for easy editing of the template. I have tried several things but so far couldn't manage to achieve it, any help would be much appreciated. Thanks.

没有正确的解决方案

其他提示

Why not just direct to the same page? And then do something like this at the top.

if(isset($_POST['whatever'])) {
  //process login stuff
  //redirect home and die if you want
}

//or continue execution normally
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top