-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path18-exe-recap.php
More file actions
28 lines (28 loc) · 910 Bytes
/
18-exe-recap.php
File metadata and controls
28 lines (28 loc) · 910 Bytes
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
<?php
include "18-fonctions.php";
?>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title>Exe recap</title>
</head>
<body>
<h1>Exe recap</h1>
<h2>Formulaire avec variables get</h2>
<form action="" name="nom" method="get">
<input name="chiffre1" type="text" placeholder="1"> *
<input name="chiffre2" type="text" placeholder="1">
<input type="submit" value="=">
</form>
<h3>Demande</h3>
<p>Ïncluez le fichier contenant notre fonction multi, si l'utilisateur clique sur le signe "=", affichez la réponse au calcul ci-dessous (il faut vérifier l'existence des 2 variables get pour le faire)</p><p>
<?php
// si les variables get existent (voir url)
if(isset($_GET["chiffre1"],$_GET["chiffre2"])){
// on affiche (echo) le résultat de la fonction multi($_GET["chiffre1"],$_GET["chiffre2"])
echo multi($_GET["chiffre1"],$_GET["chiffre2"]);
}
?></p>
</body>
</html>