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 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131
| <?php
$faire = $_POST['faire'];
$codePays = $_POST['codePays'];
$codeDepartement = $_POST['codeDepartement'];
$codeCommune = $_POST['codeCommune'];
$numGite = $_POST['numGite'];
$nomPays = $_POST['nomPays'];
$nomDepartement = $_POST['nomDepartement'];
// $nomCommmune = $_POST['nomCommmune'];
$dateCreaFicheG = $_POST['dateCreaFicheG'];
$nomLieuDit = $_POST['nomLieuDit'];
$createurFicheG = $_POST['createurFicheG'];
$nomGenerique = $_POST['nomGenerique'];
$nomSaisieFicheG = $_POST['nomSaisieFicheG'];
$numCarteIgn = $_POST['numCarteIgn'];
//$precisionCarteIgn = $_POST['precisionCarteIgn'];
$natureRoche = $_POST['natureRoche'];
$numCarteBrgm = $_POST['numCarteBrgm'];
$typeGite = $_POST['typeGite'];
$prospecteur = $_POST['prospecteur'];
$nomEtage = $_POST['nomEtage'];
$descriptionComplementEtage = $_POST['descriptionComplementEtage'];
$altitudeGite1 = $_POST['altitudeGite1'];
$altitudeGite2 = $_POST['altitudeGite2'];
$nomMilieu = $_POST['nomMilieu'];
$corX1Gite = $_POST['corX1Gite'];
$geomorphologie = $_POST['geomorphologie'];
$corX2Gite = $_POST['corX2Gite'];
$materiau = $_POST['materiau'];
$corY1Gite = $_POST['corY1Gite'];
$corY2Gite = $_POST['corY2Gite'];
$biblio = $_POST['biblio'];
$echantillons = $_POST['echantillons'];
?>
<!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="fr" lang="fr">
<head>
<title>Nouvel enregistrement gîte : echo</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="lith_style_form.css" />
</head>
<body>
<H1>Lithothèque TRACES</H1>
<H2>Le gîte a bien été créé</H1>
<?php
echo '<p>Formulaire gîte créé à ';
echo date('H:i, \l\e j-m-Y');
echo '</p>';
?>
<?php echo 'Code pays (norme ISO 3166-1) : ' . $codePays; ?> <br />
<?php echo 'Code département : ' . $codeDepartement; ?> <br />
<?php echo 'Code commune (code INSEE) : ' . $codeCommune; ?> <br />
<?php echo 'N° de gîte : ' . $numGite; ?> <br />
<?php echo 'Nom pays : ' . $nomPays; ?> <br />
<?php echo 'Nom département : ' . $nomDepartement; ?> <br />
<?php echo 'Date création fiche : ' . $dateCreaFicheG; ?> <br />
<?php echo 'Nom lieu-dit : ' . $nomLieuDit; ?> <br />
<?php echo 'Auteur fiche : ' . $createurFicheG; ?> <br />
<?php echo 'Nom générique : ' . $nomGenerique; ?> <br />
<?php echo 'Nom saisie fiche : ' . $nomSaisieFicheG; ?> <br />
<?php echo 'Carte IGN et précision : ' . $numCarteIgn; ?> <br />
<?php echo 'Nature roche : ' . $natureRoche; ?> <br />
<?php echo 'Carte BRGM et précision : ' . $numCarteBrgm; ?> <br />
<?php echo 'Type de gîte : ' . $typeGite; ?> <br />
<?php echo 'Prospecteur : ' . $prospecteur; ?> <br />
<?php echo 'Etage : ' . $nomEtage; ?> <br />
<?php echo 'Complément étage : ' . $descriptionComplementEtage; ?> <br />
<?php echo 'Z : ' . $altitudeGite1; ?> <br />
<?php echo 'Z2 : ' . $altitudeGite2; ?> <br />
<?php echo 'Nom milieu : ' . $nomMilieu; ?> <br />
<?php echo 'X : ' . $corX1Gite; ?> <br />
<?php echo 'Géomorphologie : ' . $geomorphologie; ?> <br />
<?php echo 'X2 : ' . $corX2Gite; ?> <br />
<?php echo 'Description matériau in situ : ' . $materiau; ?> <br />
<?php echo 'Y : ' . $corY1Gite; ?> <br />
<?php echo 'Biblio : ' . $biblio; ?> <br />
<?php echo 'Y2 : ' . $corY2Gite; ?> <br />
<?php echo 'Echantillons : ' . $echantillons; ?> <br />
<?php
try
{
$bdd = new PDO('mysql:host=localhost;dbname=lithotheque', 'root', 'root');
}
catch(Exception $e)
{
die('Erreur : '.$e->getMessage());
}
?>
<?php
// on teste si les variables du formulaire sont bien déclarées
if (isset($_POST['numGite']) && isset($_POST['nomLieuDit']) && isset($_POST['altitudeGite1']) && isset($_POST['altitudeGite2']) && isset($_POST['corX1Gite']) && isset($_POST['corX2Gite']) && isset($_POST['corY1Gite']) && isset($_POST['corY2Gite']) && isset($_POST['typeGite']) && isset($_POST['geomorphologie']) && isset($_POST['nomGenerique']) && isset($_POST['dateCreaFicheG']) && isset($_POST['createurFicheG']))
?>
<?php
$req = $bdd->prepare('INSERT INTO GITE(numGite, nomLieuDit, altitudeGite1, altitudeGite2, corX1Gite, corX2Gite, corY1Gite, corY2Gite, typeGite, geomorphologie, nomGenerique, dateCreaFicheG, createurFicheG) VALUES(:numGite, :nomLieuDit, :altitudeGite1, :altitudeGite2, :corX1Gite, :corX2Gite, :corY1Gite, :corY2Gite, :typeGite, :geomorphologie, :nomGenerique, :dateCreaFicheG, :createurFicheG)');
$req->execute(array(
'numGite' => $numGite,
'nomLieuDit' => $nomLieuDit,
'altitudeGite1' => $altitudeGite1,
'altitudeGite2' => $altitudeGite2,
'corX1Gite' => $corX1Gite,
'corX2Gite' => $corX2Gite,
'corY1Gite' => $corY1Gite,
'corY2Gite' => $corY2Gite,
'typeGite' => $typeGite,
'geomorphologie' => $geomorphologie,
'nomGenerique' => $nomGenerique,
'dateCreaFicheG' => $dateCreaFicheG,
'createurFicheG' => $createurFicheG
));
?>
<?php echo 'apres requete sql' ?> <br />
<table>
<tr>
<td><a href="index.html">Accueil</a></td><td><img src="images/separateur_ver.png" />
<td><a href="arch_contacts.html">Contacts</a></td><td><img src="images/separateur_ver.png" /></td>
<td><a href="arch_mentions_legales.html">Mentions légales</a></td>
<td><img src="images/separateur_ver.png" /></td><td><a href="arch_plan_site.html">Plan du site</a></td><td><img src="images/separateur_ver.png" /></td><td><a href="arch_admin.html">Administration</a></td></tr></table>
</body>
</html> |