bonjour à tous,

je suis complètement perdue dans le code, je dois oublier quelque chose de primordial mais je ne vois plus rien

j'ai une page "login" : username + password
si je suis reconnue j'accède à la page "client_bandeson"
la page "login" fonctionne très bien
mais je n'arrive pas à garder les infos de session dans la page "client_bandeson", ce qui fait que j'arrive sur la page vierge et tous les champs de résultats n'apparaissent pas puisque a priori l'identifiant de la session n'est pas conservé malgré le code

une idée sur ce qui cloche ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<?php require_once('Connections/connexion_sdfdata.php'); ?>
<?php
if (!isset($_SESSION)) {
  session_start();
}
$MM_authorizedUsers = "";
$MM_donotCheckaccess = "false";
 
// *** Restrict Access To Page: Grant or deny access to this page
function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) { 
  // For security, start by assuming the visitor is NOT authorized. 
  $isValid = False; 
 
  // When a visitor has logged into this site, the Session variable MM_Username set equal to their username. 
  // Therefore, we know that a user is NOT logged in if that Session variable is blank. 
  if (!empty($UserName)) { 
    // Besides being logged in, you may restrict access to only certain users based on an ID established when they login. 
    // Parse the strings into arrays. 
    $arrUsers = Explode(",", $strUsers); 
    $arrGroups = Explode(",", $strGroups); 
    if (in_array($UserName, $arrUsers)) { 
      $isValid = true; 
    } 
    // Or, you may restrict access to only certain users based on their username. 
    if (in_array($UserGroup, $arrGroups)) { 
      $isValid = true; 
    } 
    if (($strUsers == "") && false) { 
      $isValid = true; 
    } 
  } 
  return $isValid; 
}
 
$MM_restrictGoTo = "login.php";
if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) {   
  $MM_qsChar = "?";
  $MM_referrer = $_SERVER['PHP_SELF'];
  if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";
  if (isset($_SERVER['QUERY_STRING']) && strlen($_SERVER['QUERY_STRING']) > 0) 
  $MM_referrer .= "?" . $_SERVER['QUERY_STRING'];
  $MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer);
  header("Location: ". $MM_restrictGoTo); 
  exit;
}
?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }
 
  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
 
  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}
 
$maxRows_rsMusique = 10;
$pageNum_rsMusique = 0;
if (isset($_GET['pageNum_rsMusique'])) {
  $pageNum_rsMusique = $_GET['pageNum_rsMusique'];
}
$startRow_rsMusique = $pageNum_rsMusique * $maxRows_rsMusique;
 
$colname_rsMusique = "-1";
if (isset($_GET['listesID'])) {
  $colname_rsMusique = $_GET['listesID'];
}
//--------------------------------------------------Jeu rsRappelClient
$colname_rsRappelClient = "-1";
if (isset($_SESSION['MM_username'])) {
  $colname_rsRappelClient = $_SESSION['MM_username'];
}
mysql_select_db($database_connexion_sdfdata, $connexion_sdfdata);
$query_rsRappelClient = sprintf("SELECT ID FROM clients WHERE username = %s", GetSQLValueString($colname_rsRappelClient, "text"));
$rsRappelClient = mysql_query($query_rsRappelClient, $connexion_sdfdata) or die(mysql_error());
$row_rsRappelClient = mysql_fetch_assoc($rsRappelClient);
$totalRows_rsRappelClient = mysql_num_rows($rsRappelClient);
 
//---------------------------------------------------Jeu rsMusique
 
$colname_rsMusique = "-1";
if (isset($_GET['clientsID'])) {
  $colname_rsMusique = $_GET['clientsID'];
}
mysql_select_db($database_connexion_sdfdata, $connexion_sdfdata);
$query_rsMusique = sprintf("SELECT musique.titre, musique.playlist, musique.fichierMP3,clients.ID FROM clients, listes, musique WHERE listes.clientsID=%s AND listes.clientsID= clients.ID AND listes.reference=musique.reference", GetSQLValueString($colname_rsMusique, "int"));
$rsMusique = mysql_query($query_rsMusique, $connexion_sdfdata) or die(mysql_error());
$row_rsMusique = mysql_fetch_assoc($rsMusique);
$totalRows_rsMusique = mysql_num_rows($rsMusique);
 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Document sans titre</title>
<style type="text/css">
body,td,th {
	color: #909;
}
body {
	background-color: #000;
}
</style>
</head>
 
<body>
<p>Liste des bandes son pour le client </p>
<p></p>
<?php if ($totalRows_rsMusique > 0) { // Show if recordset not empty ?>
  <table width="700" border="1">
    <tr>
      <th scope="col">titre de la bande son</th>
      <th scope="col">playlist</th>
      <th scope="col">fichier mp3</th>
    </tr>
    <?php do { ?>
      <tr>
        <td><?php echo $row_rsMusique['titre']; ?></td>
        <td><?php echo $row_rsMusique['playlist']; ?></td>
        <td><?php echo $row_rsMusique['fichierMP3']; ?></td>
      </tr>
      <?php } while ($row_rsMusique = mysql_fetch_assoc($rsMusique)); ?>
  </table>
<?php } // Show if recordset not empty ?>
<p>&nbsp;</p>
</body>
</html>
<?php
mysql_free_result($rsMusique);
mysql_free_result($rsRappelClient);
?>
je ne suis pas fortiche en php, votre aide serait la bienvenue !