How can you make a login cookie of the POST -data by PHP?
My code registration.php
global $login_cookie = $_POST['email'] . ',' . md5($_POST['password']);
// this does not work: Parse error: syntax error, unexpected '=', expecting ',' or ';'
setcookie("login_cookie", $login_cookie);
// this is empty because of the above
where the two pieces of POST data are not empty.
I run the following test-commands at index.php
echo $login_cookie;
print_r($_COOKIE);
I get nothing.
The problem is in the first declaration of $login_cookie.