My problem is that I try to create a cookie to know which is the user that is using the web, the system I want to try is quite simple, I just want to create the cookie from the mail of the person who wants to start the session, the cookie should be created even if the email is incorrect - This does not matter since the web does not have sensitive information and the login form will not let the user enter if it provides the incorrect data -.
But it turns out that for some reason javascript does not add the cookie, can you help me?
<script>
var identiu = function(){
document.cookie = "identi=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/127.0.0.1";
var name = identi;
var value = document.getElementById("emailusuario");
document.cookie = name + "=" + value + ";path=/127.0.0.1";
}
</script>