Skip to content

Commit 99cfd33

Browse files
committed
add bootstrap and change charset
1 parent fa549fe commit 99cfd33

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

routers/form.router.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
$contact->save();
5555

5656
$app->redirect('/form/edit/'. $id);
57+
5758
});
5859

5960

@@ -253,7 +254,7 @@
253254
$create_table_statement .= 'primary key(id)';
254255

255256
$create_table_statement = rtrim($create_table_statement, ",");
256-
$create_table_statement .= ') ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;';
257+
$create_table_statement .= ') ENGINE=InnoDB DEFAULT CHARSET=latin1';
257258

258259

259260
// And now we have to add indexes

routers/submitform.router.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
// encounter where the type of input we want to create gives as the value in a format
5858
// different than we want to store (e.g. Checkbox gives 'on' and we want to store 1)
5959
$value_inserted = DbConversor::convert($form_field->getTypeString(), $var);
60-
60+
6161
$response->$key = $value_inserted;
6262

6363
// We also add it to our parameters array for it to be send to the contact by

www/bootstrap.php

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?php
2+
session_start();
3+
?>

www/index.php

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
'templates.path' => '../templates/',
1515
));
1616

17+
// We set the content-type
18+
$app->contentType('text/html; charset=utf-8');
19+
1720
// We add the Auth middleware
1821
$app->add(new \MyMiddleware\Auth());
1922

0 commit comments

Comments
 (0)