e1c1e33db905b3afd6c5ebada025c856bc4d592b
[yaffs-website] / vendor / behat / mink-browserkit-driver / tests / web-fixtures / advanced_form_post.php
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">
3 <head>
4     <title>Advanced form save</title>
5     <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
6 </head>
7 <body>
8 <?php
9 error_reporting(0);
10
11 $request = $app['request'];
12 $POST = $request->request->all();
13 $FILES = $request->files->all();
14
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]);
17 }
18
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';
22 ksort($POST);
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()));
27 } else {
28     echo "no file";
29 }
30 ?>
31 </body>
32 </html>