Bonjour,
avant que je fasse un isset (... ), ligne 15, ça passait
Code html : 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
<!doctype html>
<html lang="fr">
<head>
  <meta charset="utf-8">
  <title>The Avengers fan Page</title>
 
  <link rel="stylesheet" href="">
 
  <script src=""></script>
  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
 
<script type="application/javascript">
 var Str = "<?php echo $row[nom]; ?>";
 if (Str != ""){
 alert(Str);// c'est là que ça coince :( ????? 
 }
</script>
<?php
if(isset($_GET['Test'])){
    //si le formulaire a été posté alors on peut récupérer la valeur du champ
    $Test = $_GET['Test'];
 
/* Connexion à une base ODBC avec l'invocation de pilote */
$dsn = 'mysql:dbname=testphp;host=127.0.0.1';
$user = 'root';
$password = '';
 
try {
        $conn = new PDO($dsn, $user, $password);
} catch (PDOException $e) {
        echo 'Connexion échouée : ' . $e->getMessage();
}
 echo "Ca marche :)" . $Test . "<br>";
        $sql =  'SELECT * FROM testnom WHERE nom="' . $Test .'"';
        foreach  ($conn->query($sql) as $row) {
                echo $row["nom"] . "<br>";
                }
        }
?>
</head>
	<body>
	<p><a href="pdo.php?Test=Test_1">Test</a></p>
	</body>
</html>

Une idée du pourquoi ? par avance merci.
Amicalent Rick