Make helloworld2
This commit is contained in:
parent
8732a845d2
commit
ca070249c9
1 changed files with 21 additions and 0 deletions
21
helloworld2.php
Normal file
21
helloworld2.php
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Hello World 2</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<ul>
|
||||||
|
<?php
|
||||||
|
if (isset($_GET["nb"])) {
|
||||||
|
$nb = (int) $_GET["nb"];
|
||||||
|
if ($nb >= 0 and $nb <= 100)
|
||||||
|
for ($i = 0; $i < $nb; $i++) { ?>
|
||||||
|
<li>Hello World !</li>
|
||||||
|
<?php }
|
||||||
|
} else { ?>
|
||||||
|
<strong>Invalid number !</strong>
|
||||||
|
<?php } ?>
|
||||||
|
</ul>
|
||||||
|
</body>
|
||||||
|
</html>
|
Reference in a new issue