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
| <html>
<head>
<title>Consultation de timbre</title>
</head>
<body>
<?
$search = $_POST['annee'];// année à consulter
$pays = "france";
//paramêtre de connection provisoire
mysql_connect("localhost", "root", "") or exit (mysql_error());//connection au serveur MYSQL
//connection à la base de donnée continent pour trouver le continent auquel appartient le pays saisie
mysql_select_db("pays") or exit (mysql_error());
$sql = mysql_query("SELECT Pays, continent FROM pays WHERE pays='$pays'")or exit (mysql_error());
while ($donnee = mysql_fetch_array($sql))
{
$continent = $donnee['continent'];
$pays = $donnee['Pays'];
}
mysql_close();
mysql_connect("localhost", "root", "") or exit (mysql_error());//connection au serveur MYSQL
mysql_select_db("$pays") or exit (mysql_error()); //recherche dans la base de donnée pays
$sql = mysql_query("SELECT Num_Yvert_et_Tellier, Poste, Cote_Neuve, Cote_Charniere, Cote_Oblitere, pays FROM `$search`")or exit (mysql_error());//lecture de l'année sélectionner
//requête pour afficher les images
$affichage = mysql_query("SELECT Num_Yvert_et_Tellier, pays FROM `$search`") or exit (mysql_error());
//ENREGISTREMENT DANS LA TABLE VARIABLE
mysql_close();
mysql_connect("localhost", "root", "") or exit (mysql_error());//connection au serveur MYSQL
mysql_select_db("variablefrance") or exit (mysql_error()); //recherche dans la base de donnée variable
mysql_query("INSERT INTO variablefrance (annee, pays) VALUES ('".$search."','".$pays."')") or exit (mysql_error());
//echo "L insertion s est bien déroulée !";
?>
<br>
<table border align=center>
<tr>
<th>N°Yvert & Tellier</th>
<th>Poste</th>
<th>Côte Neuve</th>
<th>Côte Charnière</th>
<th>Côte Oblitéré</th>
<th>pays</th>
<th>Aperçu</th>
<th>Modifier</th>
<th>Supprimer</th>
</tr>
<?
while ($donnee = mysql_fetch_array($sql) and $result = mysql_fetch_assoc($affichage))
{
?>
<tr>
<form method="post" action="modification.php">
<th><?echo $donnee['Num_Yvert_et_Tellier'];?></th>
<th><?echo $donnee['Poste'];?></th>
<th><?echo $donnee['Cote_Neuve'];?></th>
<th><?echo $donnee['Cote_Charniere'];?></th>
<th><?echo $donnee['Cote_Oblitere'];?></th>
<th><?echo $donnee['pays'];?></th>
<th>
<a>
<?echo '<a href="apercufrance.php?Num_Yvert_et_Tellier='.$result[Num_Yvert_et_Tellier].'"><img src="apercufrance.php?Num_Yvert_et_Tellier='.$result[Num_Yvert_et_Tellier].'" alt="'.$result[nom].'" title="'.$result[nom].'" height=40 width=40"/></a>';?>
</a>
</th>
<th>
</form>
<!--PARTIE MODIFICATION D UN TIMBRE-->
<form action="modificationfrance.php">
<? echo '<a href="modificationfrance.php?modifier= ' .$donnee['Num_Yvert_et_Tellier'] .'">';?>Modifier</a>
<?
if (isset($_GET['Num_Yvert_et_Tellier'] ))
{
echo "ce n'est pas une modification, erreur";
}
?>
</form>
</th>
<th>
<!--PARTIE SUPPRESSION D'UN TIMBRE-->
<a href="confirmation_france.php?modifier=<?php echo $donnee['Num_Yvert_et_Tellier']; ?>" onclick="return(confirm('Etes-vous sûr de vouloir supprimer cette entrée?'));">Supprimer</a>
</th>
</tr>
<?
}
?>
</table>
<p align=center><form action="accueil.html">
<input type="submit" value="Accueil"></P>
</form>
<p align=center><form action="recherche.html">
<input type="submit" value="retour"></P>
</form> |
Partager