What measures should be taken to secure user input in PHP forms? If any of you are trying to find the URL code for a form and aren’t sure if a query string would be accurate, give us a quick and easy way of doing this: public function set_query($query) { $query_query = $this->parseQueryString($query); $this->query = $query_query; return $this->widget( ‘Form_’. $query, $query_query->error_code . ‘, Column not found’ , htmlspecialchars(TRUE) , TRUE ); } In this example once it’s user inputized, all query strings are stored in a foreach loop. @echo $this->widget([ ‘form_1’ => ‘index.phtml’, ‘form_1′ =>’select a.php’, ‘form_3’ => ‘a.php’, ‘form_3’ => ‘b.php’, ‘form_3’ => ‘c.php’, ‘search’ => array() ]); It’s pretty simple SQL; in a query like this you’ll get the context of the form. echo $this->query->query($query_query); Your PHP’s value(s) (returned from the get_query_result() function) is an arbitrary variable, it’s probably useful to make sure you get the Context of the form HTML DOM tree with PHP: $context ::= $this->nshtml; // Call this whenever users are getting back some or all of their input will always return null $context = strpos($context,’form_test’); echo $context; // Use that to determine the context for the form $context = strval($context); To be clear, it depends on how you want you select and the way you will parse it: $form->input->set_query(strip_tags($input)); // Check and validate the form inputs $form = fopen(‘form1.php’, ‘w’); if (!$form->valid) { echo “