How to connect two pages between each other?
For example, there is a login page where the user name is requested, and a second page where the name entered at the entrance is used (display, output, etc.). Example, when you click on the add-name, the entered value is remembered and, in theory, there should be a transition to the next page, how can this be correctly implemented? And will not there be conflicts from two pages using the same code (file, the variables will be simple others)?
$(document).ready(function() { var name = ""; $("#add-name").click(function() { name = $("#name").val(); if($("#name").val() == "") { alert("Введите имя"); return false; } return false; }); }); <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <form id="form" action="#" method="POST"> <input id="name" type="text" placeholder="Введите имя"> <input id="add-name" type="submit" value="Продолжить"> </form>