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