I have the following problem,
When I connect a user at my database, he doesn't remember the login. Indeed, I want to show the name of the member connected in my web page.
My code:
config.php
<?php
$connect = mysql_connect('localhost','root','aragorn11') or die ("erreur de connexion");
mysql_select_db('biblio',$connect) or die ("erreur de connexion base");
?>
session.php
<?php
session_start();
if (isset($_SESSION["login"])){
$connected=1;
$login=$_SESSION["login"];
}
?>
And member.php
<?php
include ("config.php");
include ("session.php");
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Adherents_Connectés</title>
<link rel="stylesheet" type="text/css" href="accueil.css" />
</head>
<body>
<?php
echo "<h4>Welcome : $login</h4>\n";
?>
<h4> <a href = "index.html"> Déconnexion </a> <br/> </h4>
<p> Liste des actions possibles pour un adherent de la bibliothèque est :
<ul>
<a href = "liste_dispo_adherents.php" > Consulter la liste des livres disponibles </a>
</ul>
<ul>
<a href = "emprunt.php" > Emprunter un livre </a>
</ul>
</p>
</body>
</html>