0

I am using CodeIgniter v 3.1.4. In one of the form, i have a text box to save urls (like https://stackoverflow.com/questions/ask, http://google.com etc.) into the MySql database.

Before save, i am sanitizing the urls like shown below:

Inside Constructor:

$this->load->helper('security');

Inside Add function:

$hlt_url    = $this->security->xss_clean($this->input->post('txtHLnk'));
$hlt_hlines = $this->security->xss_clean($this->input->post('txtAreaHLine'));

When i enter simple/plain string in the textboxes, then the data gets saved in the DB, however when i enter url in the textboxes, the data is not saved in DB, neither does it show any error message.

Please explain with code whats i am doing wrong. Thanks

dengApro
  • 3,848
  • 2
  • 27
  • 41
gomesh munda
  • 838
  • 2
  • 14
  • 32
  • Please check https://stackoverflow.com/questions/32665715/codeigniter-unable-to-access-an-error-message-corresponding-to-your-field-name/32665869#32665869 – Saty Sep 22 '17 at 07:55

1 Answers1

0

$hlt_url = $this->input->post('txtHLnk', true); $hlt_hlines = $this->input->post('txtAreaHLine', true);

I thin kthis is the new implementation of sanitizing inputs in latest version.

Randy Rebucas
  • 104
  • 1
  • 5