PHP wont read past backslash (addslashes())
문제
I am having trouble with getting PHP to read the whole string.
I currently have...
<input type="text" name="example" value="My name's Simon" />
I have added addslashes($_POST['example'])
However when I echo
to check the output it only reads "My name\"
and then will not read any more. Can anyone help with this?
I am using it to update a row in MySQL and obviously if the input is not matching, it is not updating the table. How can I get it to read the whole string after the backslash?
(The code currently works fine and updates the table correctly when there is no single quotes/apostrophe).
Any help would be much appreciated.
Thank you.
올바른 솔루션이 없습니다
제휴하지 않습니다 StackOverflow