Bonjour,

Dans mon fichier index.php j'index mes pages (je ne met pas tout)
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
<title>Menu accueil Niveau 4</title>
</head>
<body>
<?php
  $url='div-contenu-accueil.php';
  if(isset($_GET['page']))
    switch($_GET['page']){
 
 
 
// --Page d'accueil general du Niveau 4	
case 'accueil': $url="../index.php";break;
case 'sommaire': $url="div-sommaire.php";break;
 
// ---------- AGENDA TELEPHONIQUE2 MYSQL----------
case 'at2': $url="../N4/habitation/agenda-telephonique2/liste_detail.php";break;
case 'dc2': $url="../../../N4/habitation/agenda-telephonique2/detail_contacts.php";break;
    }  
 
 
 $top0 = gettimeofday();	 
 require ("style-site.css");
?>
<div id="conteneur">
<div id="entete"><?php require_once ("div-entete.php");?></div>
<div id="infos"><?php require_once("../commun/info-maison/info-maison.php"); ?></div>
<div id="menu"><?php  require_once ("div-menu-deroulant.php");?></div> 
<div id="contenu"><?php require_once($url) ;?></div>
<div id="pied"><?php  require_once ("pied.php");?></div> 
</body>
</html>
dans mon menu j'ai mis ceci
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
<li><a href="index.php?page=at2">Annuaire t&eacute;l&eacute;phonique 2</a></li>
	  			<li><a href="index.php?page=dc2">Annuaire t&eacute;l&eacute;phonique 2</a></li>
quand je vais sur ma la page "index.php?page=at2" ca marche et le navigateur affiche bien l'url "http://192.168.0.1/maison/N4/index.php?page=at2" mais quand je veut le détail des contacts, par exemple le 8 dans le navigateur l'url "http://192.168.0.1/N4/index.php?page=dc2?recordID=8" s'affiche "Not Found
The requested URL /N4/index.php was not found on this server.
Apache/2.2.16 (Debian) Server at 192.168.0.1 Port 80" je pense que vient de Raw. En deux mot la page "index.php?page=dc2" ne s'intègre pas avec index.php.


Page : Liste_detail.php
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
<?php require_once('contacts.php'); ?>
<?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;
}
}
mysql_query("SET NAMES UTF8");
$currentPage = $_SERVER["PHP_SELF"];
 
$maxRows_Liste_contacts = 15;
$pageNum_Liste_contacts = 0;
if (isset($_GET['pageNum_Liste_contacts'])) {
  $pageNum_Liste_contacts = $_GET['pageNum_Liste_contacts'];
}
$startRow_Liste_contacts = $pageNum_Liste_contacts * $maxRows_Liste_contacts;
 
mysql_select_db($database_contacts, $contacts);
$query_Liste_contacts = "SELECT id, societe, nom, prenom FROM telephonique";
$query_limit_Liste_contacts = sprintf("%s LIMIT %d, %d", $query_Liste_contacts, $startRow_Liste_contacts, $maxRows_Liste_contacts);
$Liste_contacts = mysql_query($query_limit_Liste_contacts, $contacts) or die(mysql_error());
$row_Liste_contacts = mysql_fetch_assoc($Liste_contacts);
 
if (isset($_GET['totalRows_Liste_contacts'])) {
  $totalRows_Liste_contacts = $_GET['totalRows_Liste_contacts'];
} else {
  $all_Liste_contacts = mysql_query($query_Liste_contacts);
  $totalRows_Liste_contacts = mysql_num_rows($all_Liste_contacts);
}
$totalPages_Liste_contacts = ceil($totalRows_Liste_contacts/$maxRows_Liste_contacts)-1;
 
$queryString_Liste_contacts = "";
if (!empty($_SERVER['QUERY_STRING'])) {
  $params = explode("&", $_SERVER['QUERY_STRING']);
  $newParams = array();
  foreach ($params as $param) {
    if (stristr($param, "pageNum_Liste_contacts") == false && 
        stristr($param, "totalRows_Liste_contacts") == false) {
      array_push($newParams, $param);
    }
  }
  if (count($newParams) != 0) {
    $queryString_Liste_contacts = "&" . htmlentities(implode("&", $newParams));
  }
}
$queryString_Liste_contacts = sprintf("&totalRows_Liste_contacts=%d%s", $totalRows_Liste_contacts, $queryString_Liste_contacts);
?>
<!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=iso-8859-1" />
<title>liste_detail</title>
</head>
<body>
  <p>&nbsp;</p>
  <table border="1" align="center">
    <tr>
      <td>id</td>
      <td>Soci&egrave;te</td>
      <td>Nom</td>
      <td>Prènom</td>
      <td>Fiche</td>
    </tr>
    <?php do { ?>
      <tr>
         <td> <!-- <a href="detail_contacts.php?recordID=<?php //echo $row_Liste_contacts['id']; ?>"> <?php //echo $row_Liste_contacts['id']; ?>&nbsp; </a> --> 
<?php echo $row_Liste_contacts['id']; ?>
</td>
        <td><?php echo $row_Liste_contacts['societe']; ?>&nbsp;</td>
        <td><?php echo $row_Liste_contacts['nom']; ?>&nbsp; </td>
        <td><?php echo $row_Liste_contacts['prenom']; ?>&nbsp; </td>
        <td><a href="../../../N4/index.php?page=dc2?recordID=<?php echo $row_Liste_contacts['id']; ?>">Voir</a></td>
      </tr>
      <?php } while ($row_Liste_contacts = mysql_fetch_assoc($Liste_contacts)); ?>
  </table>
<br />
 
 
 
<div style="text-align: center;">
Enregistrements <?php echo ($startRow_Liste_contacts + 1) ?> &agrave;*<?php echo min($startRow_Liste_contacts + $maxRows_Liste_contacts, $totalRows_Liste_contacts) ?> sur <?php echo $totalRows_Liste_contacts ?>
 
 
</div>
 
 
 
  <table border="0" align="center">
    <tr>
      <td><?php if ($pageNum_Liste_contacts > 0) { // Show if not first page ?>
          <a href="<?php printf("%s?pageNum_Liste_contacts=%d%s", $currentPage, 0, $queryString_Liste_contacts); ?>">Premier</a>
          <?php } // Show if not first page ?></td>
      <td>&nbsp;</td>
      <td><?php if ($pageNum_Liste_contacts > 0) { // Show if not first page ?>
          <a href="<?php printf("%s?pageNum_Liste_contacts=%d%s", $currentPage, max(0, $pageNum_Liste_contacts - 1), $queryString_Liste_contacts); ?>">Pr&eacute;c&egrave;dent</a>
          <?php } // Show if not first page ?></td>
      <td>&nbsp;</td>
      <td><?php if ($pageNum_Liste_contacts < $totalPages_Liste_contacts) { // Show if not last page ?>
          <a href="<?php printf("%s?pageNum_Liste_contacts=%d%s", $currentPage, min($totalPages_Liste_contacts, $pageNum_Liste_contacts + 1), $queryString_Liste_contacts); ?>">Suivant</a>
          <?php } // Show if not last page ?></td>
      <td>&nbsp;</td>
      <td><?php if ($pageNum_Liste_contacts < $totalPages_Liste_contacts) { // Show if not last page ?>
          <a href="<?php printf("%s?pageNum_Liste_contacts=%d%s", $currentPage, $totalPages_Liste_contacts, $queryString_Liste_contacts); ?>">Dernier</a>
          <?php } // Show if not last page ?></td>
    </tr>
  </table>
</body>
</html>
La ligne 97 indique le lien vers la page "detail_contacts.php" vers l'id du non du contact.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
<td><a href="../../../N4/index.php?page=dc2?recordID=<?php echo $row_Liste_contacts['id']; ?>">Voir</a></td>
Comment dois-je indiquer le lien ??

Page : detail_contacts.php
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
155
156
157
158
159
160
161
162
<?php require_once('contacts.php'); ?>
<?php
$nom_table="telephonique";
 
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;
}
}
mysql_query("SET NAMES UTF8");
$maxRows_DetailRS1 = 15;
$pageNum_DetailRS1 = 0;
if (isset($_GET['pageNum_DetailRS1'])) {
  $pageNum_DetailRS1 = $_GET['pageNum_DetailRS1'];
}
$startRow_DetailRS1 = $pageNum_DetailRS1 * $maxRows_DetailRS1;
 
$colname_DetailRS1 = "-1";
if (isset($_GET['recordID'])) {
  $colname_DetailRS1 = $_GET['recordID'];
}
mysql_select_db($database_contacts, $contacts);
$query_DetailRS1 = sprintf("SELECT * FROM $nom_table WHERE id = %s", GetSQLValueString($colname_DetailRS1, "int"));
$query_limit_DetailRS1 = sprintf("%s LIMIT %d, %d", $query_DetailRS1, $startRow_DetailRS1, $maxRows_DetailRS1);
 
$DetailRS1 = mysql_query($query_limit_DetailRS1, $contacts) or die(mysql_error());
$row_DetailRS1 = mysql_fetch_assoc($DetailRS1);
 
if (isset($_GET['totalRows_DetailRS1'])) {
  $totalRows_DetailRS1 = $_GET['totalRows_DetailRS1'];
} else {
  $all_DetailRS1 = mysql_query($query_DetailRS1);
  $totalRows_DetailRS1 = mysql_num_rows($all_DetailRS1);
}
$totalPages_DetailRS1 = ceil($totalRows_DetailRS1/$maxRows_DetailRS1)-1;
?>
<!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=iso-8859-1" />
<title>d&eacute;tail_contacts</title>
</head>
<body>
    <table width="800" border="1" align="center">
  <tr>
    <td width="370" rowspan="20"><img src="<?php echo $row_DetailRS1['id']; ?>.jpg" width="366" height="407" /></td>
    <td width="103">Id</td>
    <td width="305"><?php echo $row_DetailRS1['id']; ?></td>
  </tr>
  <tr>
    <td>Socièté</td>
    <td><?php echo $row_DetailRS1['Societe']; ?></td>
  </tr>
  <tr>
    <td>Date</td>
    <td><?php echo $row_DetailRS1['date']; ?></td>
  </tr>
  <tr>
    <td>Nom</td>
    <td><?php echo $row_DetailRS1['Nom']; ?></td>
  </tr>
  <tr>
    <td>Prenom</td>
    <td><?php echo $row_DetailRS1['Prenom']; ?></td>
  </tr>
  <tr>
    <td>Né le</td>
    <td><?php echo $row_DetailRS1['date_de_naissance']; ?></td>
  </tr>
  <tr>
    <td>Adresse 1</td>
    <td><?php echo $row_DetailRS1['Adresse1']; ?></td>
  </tr>
  <tr>
    <td>Adresse 2</td>
    <td><?php echo $row_DetailRS1['Adresse2']; ?></td>
  </tr>
  <tr>
    <td>Pays</td>
    <td><?php echo $row_DetailRS1['Code_Postal']; ?></td>
  </tr>
  <tr>
    <td>Ville</td>
    <td><?php echo $row_DetailRS1['Ville']; ?></td>
  </tr>
  <tr>
    <td>Pays</td>
    <td><?php echo $row_DetailRS1['Pays']; ?></td>
  </tr>
  <tr>
    <td>Tél fixe</td>
    <td><?php echo $row_DetailRS1['telelephone_Fixe']; ?></td>
  </tr>
  <tr>
    <td>Tél internet</td>
    <td><?php echo $row_DetailRS1['Telephone_Internet']; ?></td>
  </tr>
  <tr>
    <td>Tél portable</td>
    <td><?php echo $row_DetailRS1['Telephone_portable']; ?></td>
  </tr>
  <tr>
    <td>Opérateur</td>
    <td><?php echo $row_DetailRS1['Operateur']; ?></td>
  </tr>
  <tr>
    <td>Fax</td>
    <td><?php echo $row_DetailRS1['Fax']; ?></td>
  </tr>
  <tr>
    <td>Email 1</td>
    <td><?php echo $row_DetailRS1['Email1']; ?></td>
  </tr>
  <tr>
    <td>Email 2</td>
    <td><?php echo $row_DetailRS1['Email2']; ?></td>
  </tr>
  <tr>
    <td>Messenger</td>
    <td><?php echo $row_DetailRS1['Messenger']; ?></td>
  </tr>
  <tr>
    <td>Remarque</td>
    <td><?php echo $row_DetailRS1['Remarque']; ?></td>
  </tr>
 <!--   <tr>
    <td>imprimable</td>
    <td><?php echo $row_DetailRS1['imprimable']; ?></td>
  </tr> -->
</table>
<br>
<div style="text-align: center;"><a href="<?php echo $_SERVER['HTTP_REFERER']; ?>">[Retour]</a></div>
</body>
</html>
<?php
mysql_free_result($DetailRS1);
?>
Merci.