There are two forms, one for registration, the other for a login, initially we display a registration form. Below them there is a switch of type. If we want to log in, we press it and we get a form to fill in the login data, if we want to go back to the registration, then we pressed the button and we have the registration form again.
Initially, yes and now I’m looking in the direction of the Ajax:
<script> $(function(){ $('#form').click(function(e){ e.preventDefault(); var data = $(this).serialize(); $.ajax({ type: "POST", url: "testik.php", data: data, success: function(result) { $('#result').html(result) } }); }); }); </script> 'and here is the handler'
<?php if(isset($_POST['test'])) {?> <style type="text/css"> #form { display: none; } </style> <form id="formq"> <input type="text" name="test"> <input type="button" name="te"> </form> <?}?> 'that is, I just want to replace one form with another, but I cannot switch. I understand that I have a pod, but I’ve been doing it not so long ago and I don’t understand a lot more, maybe someone will tell.