1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru">
4 <title>Advanced form save</title>
5 <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
11 $request = $app['request'];
12 $POST = $request->request->all();
13 $FILES = $request->files->all();
15 if (isset($POST['select_multiple_numbers']) && false !== strpos($POST['select_multiple_numbers'][0], ',')) {
16 $POST['select_multiple_numbers'] = explode(',', $POST['select_multiple_numbers'][0]);
19 // checkbox can have any value and will be successful in case "on"
20 // http://www.w3.org/TR/html401/interact/forms.html#checkbox
21 $POST['agreement'] = isset($POST['agreement']) ? 'on' : 'off';
23 echo str_replace('>', '', var_export(html_escape_value($POST), true)) . "\n";
24 if (isset($FILES['about']) && file_exists($FILES['about']->getPathname())) {
25 echo html_escape_value($FILES['about']->getClientOriginalName()) . "\n";
26 echo html_escape_value(file_get_contents($FILES['about']->getPathname()));