sanitize textarea input for database insertion - best practice |
Thx for the feedback. Below seems to work fairly well.
@InsiteFX.. I threw your code into my helper file. Thx. So here is what I have: Controller: - Validate: Code: $this->form_validation->set_rules('f_text', 'Review Text', 'required|trim|callback_customAlphaTwo'); Code: public function customAlphaTwo($str) Code: $tCleanText = cleanText($this->input->post('f_text')); - Save Data Code: $aDataToSave = array( Note: cleanText() is a helper Model: - Insert Code: // Save Data |
Messages In This Thread |
sanitize textarea input for database insertion - best practice - by dbrooke - 06-26-2019, 01:22 PM
RE: sanitize textarea input for database insertion - best practice - by php_rocs - 06-26-2019, 02:12 PM
RE: sanitize textarea input for database insertion - best practice - by InsiteFX - 06-26-2019, 03:06 PM
RE: sanitize textarea input for database insertion - best practice - by dbrooke - 06-27-2019, 08:58 AM
|