Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function genera_form($action = "", $method="get", $csrf_name = "", $csrf_token = ""){
- $uid = uuid();
- ob_start();
- ?>
- <form action="<?= $action ?>" method="<?= $method ?>">
- <input type="hidden" name="<?= $csrf_name ?>" value="<?= $csrf_token ?>">
- <label for="name-<?= $uid ?>">Name</label>
- <input type="text" id="name-<?= $uid ?>" name="name<?= $uid ?>">
- <button type="submit">Submit</button>
- </form>
- <?php
- return ob_get_clean();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement