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
| <?php include '../conn.php'; ?>
<!Doctype HTML>
<html lang="fr">
<body>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="refresh" content="900;url=../logout.php" />
<link rel="shortcut icon" href="../image/logo.png" type="favicon/ico" />
<link rel="stylesheet" href="style2.css" />
</head>
<br>
<div><center>
<p1>
<!-- Tableau 2x2 -->
<table width="50%" border="1" cellspacing="1" cellpadding="50">
<tr>
<td bgcolor="#CCCCCC" height="50px">
<center>Test de 5 requêtes dans une liste déroulante <br></center>
</td>
<td align="center" bgcolor="#F00">
<?php
echo '<select name="select" id="select_valeur" >';
$q = $conn->query("SELECT name FROM Poste_1 UNION
SELECT name FROM Poste_2 UNION
SELECT name FROM Poste_3 UNION
SELECT name FROM Poste_5");
while ( $r = mysqli_fetch_array($q) )
{
echo '<option>'.$r['name'].'</option>';
}
echo '</select> <br />';
?>
</td>
</tr>
</tr>
</table>
</p1>
<br><br>
<p2>
<!-- Bouton cliquable pour afficher -->
<button class="favorite styled" >AFFICHER</button>
</p2>
<br><br><hr>
<script type="text/javascript">
function Click_Button()
{
var valeur = document.getElementById("select_valeur").value;
url = file:///C:\Users\\X\\Desktop\\nom1\\'+valeur+'.pdf'
window.open(url, '_blank');
}
</script>
</body>
</html> |
Partager