Well.. You may want to use sessions to store login data for users (so they stay logged in while navigating your site).
However, to keep track of orders, you'll want to store that in a database of some sort, otherwise you could have a very large session, and its not very practicle. What would happen if their computer crashed, or something happened, closed the browser, rebooted their computer, etc.. Their order (as in what they selected) would be lost. So I would strongly suggest a database.
Also for sessions, you do it like this:
PHP Code:
<?php
#This has to go at the top of EVERY page you use sessions on.
session_start();
$_SESSION["name"] = "This is the name session.. I guess";
$_SESSION["password"] = "This is a password";
echo $_SESSION["name"];
echo "<br>";
echo $_SESSION["password"];
#This destroys the session.
session_destroy();
?>
For further session functions, you will want to look through php.net's documentation regarding session_start(); and other stuff.
Bookmarks