Hope someone can help with this. I have already set up a separate section of my website that can be accessed only with a user name and password. That is functioning well, with the exception that all users within one entity are assigned the same IP address. When more than one user is logged in, all items placed in the shopping cart by all the logged in users goes into the same cart.
Isn't there a way to code the login so each user has a unique identification and only the items they place in their cart will be visible to them regardless of the IP address?
Here's the code from login.htm:
<form action="login.php" method="POST">
<p class="login">Username
<input type="text" name="username" id="username">
</p>
</td>
</tr>
<tr>
<td>
<p class="login">Password
<input type="password" name="password" id="password">
</p>
</td>
</tr>
<tr>
<td>
<p class="heading">
<input type="submit" id="submit" value="Login">
</p>
</td>
</tr>
</form>
Then, at the top of each web page:
<?php
session_start();
if(!$_SESSION['username']){
header("Location:../login.php");
}
?>
I appreciate any suggestions.