First working version

This commit is contained in:
Gregory Trolliet 2020-11-16 21:31:59 +01:00
parent 8a6973fcb6
commit baa592b81f
8 changed files with 192 additions and 51 deletions

View file

@ -15,17 +15,18 @@ if (isset($_GET['id'])) {
echo 'NO CLOUD';
return;
}
$nbWords = 3;
$nbWords = $db->getCloudSize($id);
echo sprintf('<p class="cloud_text">%s</p>', $db->getCloudText($id));
?>
<form method="post" action="save.php">
<form class="cloud_words" method="post" action="save.php">
<input type="hidden" id="fid" name="fid" value="<?php echo $id;?>">
<?php
for ($i=0;$i<$nbWords;$i++) {
$name = 'fword' . $i;
?>
<label for="<?php echo $name;?>">test</label>
<input type="text" id="<?php echo $name;?>" name="<?php echo $name;?>">
<?php
echo '<div>';
echo sprintf('<label for="%s">Mot %d</label>', $name, $i+1);
echo sprintf('<input type="text" id="%s" name="%s">', $name, $name);
echo '</div>';
}
?>
<input type="submit" value="Submit">