Welcome Guest, Not a member yet? Register   Sign In
Dreaded apostrophe

Hi everyone,

When I want to redirect this link and I have entered an apostrophe into the $comment variable, it give me the error: "An Error Was Encountered
The URI you submitted has disallowed characters.", I only get it when an apostrophe is entered, anything I can do to solve it?

Code for php:
$comment = $_POST['gucomment'];
        //$comment = preg_replace("/\r?\n/", "\\n", addslashes($comment));
        $comment = htmlspecialchars($comment, ENT_QUOTES);
$formCNS = array('training', 'ci', 'index.php', 'trainsession_control', 'clientNoShow');
                $formUrlCNS = site_url($formCNS);
                $formNCNS = array('training', 'ci', 'index.php', 'trainsession_control', 'viewTrainDate');
                $formUrlNCNS = site_url($formNCNS);
                $msg = '3';

Code for [removed]
                    var where_to= confirm("This client has already been evaluated.\r\nDo you want to still set this client as a no show?");
                    if (where_to== true)
                        self.location ="<? echo $formUrlCNS; ?>/<? echo $masterid; ?>/<? echo $comment; ?>/<? echo $selected; ?>/<? echo $dateid; ?>";
                        self.location = "<? echo $formUrlNCNS; ?>/<? echo $dateid; ?>/<? echo $selected; ?>/<? echo $msg; ?>";

Messages In This Thread
Dreaded apostrophe - by El Forum - 10-10-2011, 02:03 AM

Theme © iAndrew 2016 - Forum software by © MyBB