I'm trying to have a start php that allows a user to input a username and password and stores it as a cookie so when they try and log in again it will have there password stored so I'm starting a session because eventually I want to pass that to another php as a post (to verify if that's the correct password) but I'm kind of confused on starting the session because I'm not very familiar with sessions. here's what i have so far
<?php
session_start();
$_SESSION["name"] = "";
$_SESSION["password"] = "";
?>
<!DOCTYPE html>
<form action="start.php" method="post">
<head>
<meta charset="utf-8" />
<title>Remember the Cow</title>
<link href="https://webster.cs.washington.edu/css/cow-provided.css" type="text/css" rel="stylesheet" />
<link href="cow.css" type="text/css" rel="stylesheet" />
<link href="https://webster.cs.washington.edu/images/todolist/favicon.ico" type="image/ico" rel="shortcut icon" />
</head>
<body>
<div class="headfoot">
<h1>
<img src="https://webster.cs.washington.edu/images/todolist/logo.gif" alt="logo" />
Remember<br />the Cow
</h1>
</div>
<div id="main">
<p>
The best way to manage your tasks. <br />
Never forget the cow (or anything else) again!
</p>
<p>
Log in now to manage your to-do list. <br />
If you do not have an account, one will be created for you.
</p>
<form id="loginform" action="login.php" method="post">
<div><input name="name" type="text" size="8" autofocus="autofocus" /> <strong>User Name</strong></div>
<div><input name="password" type="password" size="8" /> <strong>Password</strong></div>
<div><input type="submit" value="Log in" /></div>
</form>
<p>
<em>(last login from this computer was ???)</em>
</p>
</div>
<div class="headfoot">
<p>
<q>Remember The Cow is nice, but it's a total copy of another site.</q> - PCWorld<br />
All pages and content © Copyright CowPie Inc.
</p>
<div id="w3c">
<a href="https://webster.cs.washington.edu/validate-html.php">
<img src="https://webster.cs.washington.edu/images/w3c-html.png" alt="Valid HTML" /></a>
<a href="https://webster.cs.washington.edu/validate-css.php">
<img src="https://webster.cs.washington.edu/images/w3c-css.png" alt="Valid CSS" /></a>
</div>
</div>
</body>
</html>