Bonjour,
Quand je clique sur le tableau j'aimerez recuperer ma variable selectionné
et l'afficher par un echo comment faut t'il faire ?
Merci
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 <html> <SELECT NAME="tables" MULTIPLE SIZE="8"> <?php $conn = pg_pconnect("host=localhost port=5432 dbname=base user=postgres password=postgres"); if (!$conn) { echo "Une erreur s'est produite.\n"; exit; } $resultat = pg_query($conn, "select distinct(relname) from pg_attribute, pg_class, pg_namespace where attnum>0 and attrelid=pg_class.oid and relnamespace=pg_namespace.oid and nspname ='msa'"); $tableau = array(); while($ligne = pg_fetch_assoc ($resultat)) { $tableau[] = $ligne; } ?> tables : <BR> <?php foreach ($tableau as $tab1) { echo "<OPTION VALUE=\"$tab1[relname]\"> $tab1[relname]\n"; } ?> </SELECT> <br> </html>
Partager