Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function addto_form ($new_array, $module, $text, $input_type, $name)
- {
- global $form_data;
- $form_data[$new_array] = array(
- 'new_array' => $new_array,
- 'module' => $module,
- 'text' => $test,
- 'input_type' => $input_type,
- 'name' => $name
- );
- }
- addto_form('blog', 'blogadd', 'Title:', 'text', 'title');
- function display_form($new_array)
- {
- global $form_data;
- foreach ($form_data[$new_array] as $offset => $val)
- {
- if (empty($_POST['name']) || !isset($_POST['name']))
- {
- echo (
- "<form action='./nmod={$val['module']}' method='post'>
- <h2>{$val['text']}</h2>
- <input type='{$val['input_type']}' name='{$val['name']}'>
- <br><br>
- </form>"
- );
- }
- else {
- echo ($_POST['name']);
- }
- }
- echo ("<input type='submit' value='submit'>");
- }
- ?>
Add Comment
Please, Sign In to add comment