-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.php
More file actions
50 lines (45 loc) · 970 Bytes
/
index.php
File metadata and controls
50 lines (45 loc) · 970 Bytes
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
50
<!doctype html>
<html>
<head>
<?php
// Include the file
session_start();
require_once 'SimpleForm.php';
?>
<link href="css/bootstrap.min.css" rel="stylesheet">
</head>
<body style="margin-left: 10px;">
<br>
<?php
$_SESSION['options'] = $options = array(
"Option1" => 1,
"Option2" => 2,
"Option new" => 'hello'
);
function invalid()
{
echo 'Invalid :(';
}
function valid()
{
echo 'Valid :)';
}
$additionalOptions = array(
'style' => 'color: red;',
'onclick' => 'someFunction()',
);
$form = new SimpleForm('form', 'post', 'action.php');
$form->startForm();
$form->inputText('work',"INPUT 1","work email",'email');
$form->inputText('home',"INPUT 1","home email",'email');
$form->inputSubmit("Submit Button", array('class' => 'btn btn-success'));
$form->endForm();
?>
<pre>
<?php
print_r(SimpleForm::$VALIDATION_TYPES);
?>
</pre>
<p style="color: rgb(255,0,0);"><?php $form->validate() ?></p>
</body>
</html>