0

Whenever I was inserting AT&T to database it was added as AT&T; semicolon is added extra in code igniter.

My code is like this:

  $this->input->post('carrier_name');
  $this->db->insert('cs_carrier',$insert);

please suggest.

1
  • 1
    That code doesn't make any sense at all :) Post more. May 31, 2011 at 17:42

2 Answers 2

0

In case someone comes across this later. I ran into this issue today, and it turns out it was the xss_clean function within CI. I opted not to use it and used filter_var instead.

-3

replace any special character like & = & then you can store into database.Anyway another things.Please make your data field text type otherwise it don't take any special char.

2
  • This doesn't answer the OP's question. May 31, 2011 at 17:41
  • -1 Don't store HTML entities, encode them for output only (unless it is an HTML document you're storing).
    – Mog
    Oct 22, 2011 at 22:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.