Comment puis-je agir sur des boutons que j'injecte directement via un print_r :
<?php include "../include/constantes.php";
include_once "../class/MySQL.php";
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta content="IE=edge" http-equiv="X-UA-Compatible">
<!-- Responsive Design -->
<meta content="width=device-width, initial-scale=1" name="viewport">
<meta content="" name="Tableau d'affichage">
<meta content="" name="Unnamed">
<title>Application université</title>
<!-- Application du CSS -->
<link rel="stylesheet" href="../css/bootstrap.min.css"/>
<link rel="stylesheet" href="../css/supplement.css"/>
<link rel="stylesheet" href="../css/glyphicons.css"/>
</head>
<body>
<?php include "../include/header.php"; ?>
<div class="container">
<div class="col-md-12">
<div class="table-responsive">
<!-- A voir si on utilise : table-hover , plus joli à mon goût, mais pas responsive. -->
<table class="table table-hover">
<h2>Multifonctions</h2>
<thead>
<tr>
<th>Id</th>
<th>Modèle</th>
<th>N° de série</th>
<th>N° SIUF</th>
<th>Emplacement</th>
<th>Actions</th>
</tr>
<tbody>
<?php
// Création de l'objet MySQL.
$madatabase = new MySQL();
// Connexion, récupération et sélection de la base de données
$link = $madatabase->connect();
$madatabase->select();
// Création de la requête SQL.
$sql = "SELECT devices_fricopy.id, model, serialNumber, siufNumber, building
FROM emplacements_fricopy
INNER JOIN devices_fricopy
ON emplacements_fricopy.id = devices_fricopy.emplacement_id";
$result = mysqli_query($link,$sql)
OR DIE (mysqli_error($link));
// Tant que qu'il y a des lignes, on affiche les données.
while ($ligne = $result->fetch_assoc()) {
// Injection HTML & PHP
print(
"<tr>".
"<td>".$ligne['id']." "."</td>".
"<td>".$ligne['model']." "."</td>".
"<td>".$ligne['serialNumber']." "."</td>".
"<td>".$ligne['siufNumber']." "."</td>".
"<td>".$ligne['building']."</td>".
"<td>".
'<button class="btn btn-primary btn-mini">
<i class="glyphicon glyphicon-pencil">
</i> Editer</button>'.
'<button class="btn btn-danger btn-mini">
<i class="glyphicon glyphicon-remove">
</i> Supprimer</button>'.
"</td>".
"<tr>");
}
?>
</tbody>
</thead>
</table>
</div>
</div>
</div>
<?php include "../include/footer.php"; ?>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<!-- <script type="text/JavaScript" src="js/ajax.js"></script> -->
</body>
</html>
Je débute, pas de moqueries Merci d'avance