Académique Documents
Professionnel Documents
Culture Documents
Fiche TP N°5
Exercice 1:
Exercice 2:
Exercice 3 :
Ecrivez le code source HTML + PHP qui permettra de sélectionner une spécialité (ISIA ou IL) et d’afficher
par la suite la liste de ses modulees
Solution
Exo1.php
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<form method="get" action="prod.php">
Entrer la valeur de A: <input type="text" name="Value_A"><br>
Entrer la valeur de B: <input type="text" name="Value_B"><br>
<input type="submit" value="Calculer le produit" name="calculer">
</form>
</body>
</html>
Fichier prod.php
<?php
If(!empty($_GET['Value_A']) && !empty($_GET['Value_B'])){
$a=$_GET['Value_A'];
$b=$_GET['Value_B'];
echo "le produit est :", $a*$b;
}
?>
Fichier Exo2.php
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>