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
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<?php
echo '<head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />';
echo '<title></title></head><body>';
echo '<p>Cette phrase a été écrite <strong>\'entièrement\'</strong> en PHP.<br />';
echo ('bonjour</p>');
echo '<p><a href="http://www.monsite.org/membresmonsite/listoftaxa.php?identifier=124>BlablaX</a></p>';
echo '<p><a href="http://www.monsite.org/membresmonsite/listoftaxa.php?identifier=125>BlablaY</a></p>';
$PARAM_hote = 'localhost'; // le chemin vers le serveur
$PARAM_port = '3306';
$PARAM_nom_bd = 'mabasetest'; // le nom de votre base de données à renseigner
$PARAM_utilisateur = 'root'; // nom d'utilisateur pour se connecter
$PARAM_mot_passe = ''; // mot de passe de l'utilisateur pour se connecter
try
{
$connexion = new PDO('mysql:host=' . $PARAM_hote . ';dbname=' . $PARAM_nom_bd, $PARAM_utilisateur, $PARAM_mot_passe);
} catch(Exception $e) {
echo 'Erreur : ' . $e->getMessage() . '<br />';
echo 'N° : ' . $e->getCode();
}
$requete = $connexion->prepare("SELECT nom_index, nom_complet, nom_vulgaire, nom_classique, superordre, ordre, famille, sous_famille, tribu, sous_tribu, coloration1, coloration2 FROM taxabase1 left join taxabase2 on taxabase1.identifiertaxabase 1 = taxabase 2.identifier left join taxabase3 on taxabase2.identifier taxabase2 = taxabase3.identifier left join taxabase4 on taxabase3.identifier taxabase3 = taxabase4.identifier left join taxabase5 on taxabase4.identifier taxabase4 = taxabase5.identifier left join taxabase6 on taxabase5.identifier taxabase5 = taxabase6.identifier left join taxabase7 on taxabase6.identifier taxabase6 = taxabase7.identifier left join taxabase8 on taxabase7.identifier taxabase7 = taxabase8.identifier left join taxabase9 on taxabase8.identifier taxabase8 = taxabase9.identifier WHERE taxabase1.identifier = :id");
var_dump($connexion);
$requete ->bindParam(':id', $GET["identifier"], PDO::PARAM_INT);
$requete->execute();
while($ligne=$requete->fetch(\PDO::FETCH_OBJ)){
echo ('bonsoir');
echo '<p>Nom Index: <b>'.$ligne-> nom_index . '</b></p>';
echo '<p>Nom Complet: <b>'.$ligne-> nom_complet . '</b></p>';
echo '<p>Nom Vulgaire: <b>'.$ligne-> nom_vulgaire . '</b></p>';
echo '<p>Nom Classique: <b>'.$ligne-> nom_classique . '</b></p>';
echo '<p>Superordre: <b>'.$ligne-> superordre . '</b></p>';
echo '<p>Ordre: <b>'.$ligne-> ordre . '</b></p>';
echo '<p>Famille: <b>'.$ligne-> famille . '</b></p>';
echo '<p>Sous_famille: <b>'.$ligne-> sous_famille . '</b></p>';
echo '<p>Tribu: <b>'.$ligne-> tribu . '</b></p>';
echo '<p>Sous-Tribu Complet: <b>'.$ligne-> sous_tribu . '</b></p>';
echo '<p>Coloration du lobe 1: <b>'.$ligne-> coloration1 . '</b></p>';
echo '<p> Coloration du lobe 2: <b>'.$ligne-> coloration2 . '</b></p>';
}
echo '</body>';
echo '</html>';
?> |
Partager