Hi, this is my first post here and I'm very new to php, so sorry if I'm making any basic errors...
What I want to do is have a very very simple log in system so that the user types their name in, then it sets a cookie and it is displayed in another page.
What I have so far is:
login.html
<html>
<head>
</head>
<body>
Please login
<br>
<form method="post" action="login1.php">
username:<input type="text" name= "username"/>
<br>
<input type="submit" />
</form>
</body>
</html>
login1.php
<html>
<head>
</head>
<body>
<?
$username = $_POST ['username'];
setcookie('username', $username, time()+3600);
echo("<a href="login2.php">LINK</a>");
?>
</body>
</html>
and lastly login2.php:
<?
echo $_COOKIE['username'];
?>
What am I doing wrong?? Thank you so so much for any help 🙂 it is much appreciated 🙂
Thanks again 🙂