PHP and links

There are 4 files: index.php (primary), form_login.php (form with login and password check), REG.php (new page in which the registr.php file is connected), registr.php (registration form with verification of parameters). Tell me, please, how do all these files merge together? For example, how to handle a link so that when you click on it loaded in the same window of registration form? Here is the link code

<FORM  method="POST" target="_self">
 </A></A>:<INPUT type="text" name="log">:<INPUT type="password" name="par"><INPUT type="submit" name="vhod" value="">
<A href="registr.php"><FONT size="2"></FONT></A>
</FORM>

In order to load the form you need to unload the information that was before it. How to make it means PHP without applying Ajax?


Answer 1, Authority 100%

So you need Ajax (asynchronous loading of the page content), because you exactly described it))

In general, it can, you will fit the templates.

<!--    -->
<?
$task = (!empty($_GET['task'])) ? $_GET['task'] : false;
if ($task == 'reg') {
  require 'registr.php'; //   
  } else if ($task == 'login') {
  require 'form_login.php'; //   
  } else {
  //  
  }
?>
<!--    -->

Then links will be respectively

<a href="index.php?task=reg"></a>
<a href="index.php?task=login"></a>

Answer 2

Look Link Text
I already answered in another question.