Hello,

J'ai le tableau HTML ci dessous dans lequel j'ajoute des infos provenant d'une base SQL.

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>
	<head>
		<title>Form Entries List</title>
	</head>	
	<body>
		<table>
			<tr>
			<th>doc_id</th>
			<th>doc_name</th>
			<th>form_id</th>
			<th>entry_id</th>
			<th>Print</th>
			</tr>
<?php
try
{
        $bdd = new PDO('mysql:host=xxx.mysql.db;dbname=name;charset=utf8', 'xxx', xxx',
                                                                 array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));
}
        catch (Exception $e)
{
        die('Erreur : ' . $e->getMessage());
}
$query='SELECT DISTINCT mod71_docomated_docs.doc_name, mod71_docomated_forms_mapping.doc_id, mod71_gf_entry_meta.form_id,  mod71_gf_entry_meta.entry_id
FROM mod71_gf_entry_meta
INNER JOIN mod71_docomated_forms_mapping
ON mod71_gf_entry_meta.form_id = mod71_docomated_forms_mapping.form_id
INNER JOIN mod71_docomated_docs
ON mod71_docomated_docs.doc_id = mod71_docomated_forms_mapping.doc_id';
$q_form_entries = $bdd->query($query);
 
        while ($row=$q_form_entries-> fetch())
        {
                echo "</tr><td>" . $row['doc_id'] ."</td><td>" . $row['doc_name'] ."</td><td>" . $row['form_id'] ."</td><td>" . $row['entry_id'] ."<td><input type='checkbox' /></td><tr>";
        
        }
                echo "</table>";
 
?>
 
		</table>	
	</body>
</html>

Affichage du tableau:
Nom : Capture d’écran 2019-07-20 à 11.39.26.png
Affichages : 495
Taille : 30,7 Ko

j'ai besoin de créer une fonction qui récupère les infos "doc_id", "form_id", "entry_id" de chaque ligne cochée.

selon vous quelle techno/méthode faut-t'il utiliser pour cela ? Sachant qu'il faut ensuite que l'envoi ces informations vers une autre page PHP.


Merci.