PHP Classes

File: processar.php

Recommend this page to a friend!
  Classes of Rodrigo Faustino   Fast Pages   processar.php   Download  
File: processar.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Fast Pages
Generate HTML for several types of pages
Author: By
Last change:
Date: 6 months ago
Size: 1,255 bytes
 

Contents

Class file image Download
<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
   
$num_pages = $_POST['num_pages'];
   
?>
<!DOCTYPE html>
    <html>
    <head>
        <title>Gerenciador de Páginas</title>
        <link href="public/css/materialize.min.css" rel="stylesheet">
    </head>
    <body>
        <div class="container">
            <h3>Definir Páginas e Seções</h3>
            <form action="gerador.php" method="post">
                <?php for ($i = 1; $i <= $num_pages; $i++): ?>
<div class="input-field">
                        <input type="text" name="pagina[<?= $i ?>][name]" required>
                        <label for="page_name_<?= $i ?>">Nome da Página <?= $i ?></label>
                    </div>
                    <div class="input-field">
                        <input type="number" name="pagina[<?= $i ?>][num_sections]" required>
                        <label for="num_sections_<?= $i ?>">Quantas Seções na Página <?= $i ?>?</label>
                    </div>
                <?php endfor; ?>
<button type="submit" class="btn waves-effect waves-light">Próximo</button>
            </form>
        </div>
        <script src="public/js/materialize.min.js"></script>
    </body>
    </html>
    <?php
}