20 Avril
This commit is contained in:
4
BACKEND/PHP/tp2/ex2/css/style.css
Normal file
4
BACKEND/PHP/tp2/ex2/css/style.css
Normal file
@@ -0,0 +1,4 @@
|
||||
input[type="text"]{
|
||||
display:inline;
|
||||
width:auto;
|
||||
}
|
8
BACKEND/PHP/tp2/ex2/include/controller.php
Normal file
8
BACKEND/PHP/tp2/ex2/include/controller.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
$nombre=$_GET['table'];
|
||||
echo "<h3> Table de $nombre </h3>";
|
||||
for($i=1;$i<11;$i++){
|
||||
$resultat=$i*$nombre;
|
||||
echo "<li> $i x $nombre = $resultat </li>";
|
||||
}
|
||||
?>
|
21
BACKEND/PHP/tp2/ex2/multiplication.php
Normal file
21
BACKEND/PHP/tp2/ex2/multiplication.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
include 'include/controller.php';
|
||||
?>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
|
||||
<link rel="stylesheet" href="https://unpkg.com/@picocss/pico@1.*/css/pico.classless.min.css">
|
||||
<link rel="stylesheet" href="./css/style.css">
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
<h4>Table de multiplication</h4>
|
||||
<form method="GET">
|
||||
<input type=number name="table" placeholder="table">
|
||||
<button type="submit">ENVOYER</button>
|
||||
</form>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user