CodeIgniter Forums
' character inside input - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: ' character inside input (/showthread.php?tid=56004)



' character inside input - El Forum - 11-20-2012

[eluser]Juzt1s[/eluser]
Hello,

every time I put ' inside input box and pass it, I get HTTP 500 error (blank page). How Do I avoid this?

I've tried checking if ' in input and then replace it with something else, but I get the problem where ' character is inside string. ex: Stacy's project.


' character inside input - El Forum - 11-20-2012

[eluser]solid9[/eluser]
find the error_log


' character inside input - El Forum - 11-20-2012

[eluser]InsiteFX[/eluser]
Handling quote characters in HTML form input fields



' character inside input - El Forum - 11-20-2012

[eluser]Juzt1s[/eluser]
[quote author="InsiteFX" date="1353480647"]Handling quote characters in HTML form input fields
[/quote]

Release simple and done the job. Thnx.

Code:
$name= htmlentities($this->input->post('name'), ENT_QUOTES);



' character inside input - El Forum - 11-21-2012

[eluser]Juzt1s[/eluser]
...


' character inside input - El Forum - 11-21-2012

[eluser]Aken[/eluser]
[quote author="Juzt1s" date="1353481883"]I want to ask something else.

I have a column which contains 1000 characters, but I get only 255 of them. Why is that?[/quote]
Change your column type to TEXT.