mirror of
https://github.com/arthur-pbty/nsi.git
synced 2026-06-22 18:19:37 +02:00
add projects
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Damier</title>
|
||||
<link rel="stylesheet" href="damier.css">
|
||||
</head>
|
||||
<body>
|
||||
<table>
|
||||
<?php
|
||||
|
||||
$ligne = $_POST['ligne'];
|
||||
$colone = $_POST['colum'];
|
||||
$color = 'b';
|
||||
|
||||
for ($i=0; $i<$ligne ; $i++) {
|
||||
echo("<tr>");
|
||||
for ($j=0; $j<$colone ; $j++) {
|
||||
if ($color == 'b') {
|
||||
$color = 'n';
|
||||
} else {
|
||||
$color = 'b';
|
||||
}
|
||||
echo("<td class='$color'></td>");
|
||||
|
||||
}
|
||||
echo("</tr>");
|
||||
if ($i % 2 == 0) {
|
||||
$color = 'n';
|
||||
} else {
|
||||
$color = 'b';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user