Lorsque je clique sur un bouton je n'arrive pas
a récupérer mon information , en fait j'aimerez recuperer ma valeur
et afin que je puisse mettre dans une autre variable (comment on fais ?)
afin de l'utiliser dans une autre requête plus tard
a ce niveau la
echo "<td> <input type=\"button\" value=\"Selection\" onclick=/\"\alert(helloWorld());\"></td>\n";
sur le onclick j'aimerez afficher ma variable et la mémoriser dans une autre variable
merci
Michel
<?php
function helloWorld()
{ return 'Hello World !';
}
$conn = pg_pconnect("host=localhost port=5432 dbname=base
user=postgres password=postgres");
if (!$conn) {
echo "Une erreur s'est produite.\n";
exit;
}
$requete = 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'");
echo "<table style='text-align: left; width: 100px;' border='1' cellpadding='2' cellspacing='2'>\n";
/* Entete tableau */
echo "<tbody>\n";
echo "<tr>\n";
echo "<td style='text-align: center; vertical-align: top;'>Nom des tables MSA </td>\n";
echo "</tr>\n";
while($row=pg_fetch_row($requete))
{
$pseudo=$row[0];
echo "<tr>\n";
echo "<td onclick=\"alert(helloWorld());\" style='text-align: left; vertical-align: top;'>$pseudo</td>\n";
echo "<td> <input type=\"button\" value=\"Selection\" onclick=/\"\alert(helloWorld());\"></td>\n";
echo "</tr>\n";
}
/* fin entete tableau */
echo "</tbody>\n";
echo "</table>\n";
?>