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
| <?php
if(isset($_POST["Retour"])){
$varcote=$_POST["cote"];
include('connexion.php');
$req1="update revue set nbr_exemplaire=nbr_exemplaire+1 where cote='$varcote'";
mysql_query($req1) or die (mysql_error().$req1);
}
echo"la revue empruntée a éte retourné ";
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<?php
$varnum=$_POST['num_insc'];
include('connexion.php');
$req="SELECT * FROM emprunt,revue WHERE emprunt.cote=revue.cote AND num_insc='$varnum'";
$resultat=mysql_query($req);
echo "<center><table border=\"1\" width=100%></center>";
echo "<th> Numéro d'inscription</th> <th>cote revue empruntée</th> <th>Date Emprunt </th> <th>Date Retour </th>";
$ligne=mysql_fetch_array($resultat)
?>
<tr>
<td><?php echo $ligne['num_insc']; ?></td><td><?php echo $ligne['cote']; ?> </td><td><?php echo $ligne['date_emprunt']; ?></td><td><?php echo $ligne['date_retour']; ?></td>
</tr>
<?php echo "</table>";
?><br>
<center><input type="submit" name="Retour" value="Retour"></center>
<p> </p>
<p> </p></div>
</div>
</div>
</div>
</body>
</html> |
Partager