-
Notifications
You must be signed in to change notification settings - Fork 0
/
form.php
49 lines (43 loc) · 1.07 KB
/
form.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
ob_start();
require_once('./classes/DBConnection.php');
$db = new DBConnection();
$code = isset($_GET['code']) ? $_GET['code'] : "";
if(empty($code)){
echo "<script> alert('form code is not provided'); location.replace('./')</script>";
exit;
}
ob_end_flush();
?>
<!DOCTYPE html>
<html lang="en">
<style>
/* canvas {
height: 250px !important
} */
table th,
table td {
padding: 3px !important
}
</style>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Simple Form Builder</title>
<?php include('./header.php') ?>
<script>
var form_code = "<?php echo $code ?>";
</script>
<script src="./js/form-build-display.js"></script>
</head>
<body class='bg-dark'>
<div class="container pt-4">
<?php
include './forms/'.$code.'.html';
?>
<div class="w-100 d-flex justify-content-center">
<button class="btn btn-primary" form="form-data" id="">Sumbit</button>
</div>
</div>
</body>
</html>