dailce Posted November 8, 2007 Posted November 8, 2007 Ok below are 2 pieces of code. I want to draw a form and use tep_output_string to "return htmlspecialchars($string);" Now I want to use it for a get form. Like this: tep_draw_form('filter', FILENAME_DEFAULT, 'get') I tried: tep_draw_form('filter', FILENAME_DEFAULT, 'get', true) However the HTML is not valide because I get this: <form name="currencies" action="mysite/index.php" method="get" 1 > Please help function tep_output_string($string, $translate = false, $protected = false) { if ($protected == true) { return htmlspecialchars($string); } else { if ($translate == false) { return tep_parse_input_field_data($string, array('"' => '"')); } else { return tep_parse_input_field_data($string, $translate); } } } AND function tep_draw_form($name, $action, $method = 'post', $parameters = '') { $form = '<form name="' . tep_output_string($name) . '" action="' . tep_output_string($action) . '" method="' . tep_output_string($method) . '"'; if (tep_not_null($parameters)) $form .= ' ' . $parameters; $form .= '>'; return $form; }
Recommended Posts
Archived
This topic is now archived and is closed to further replies.