PHP wont read past backslash (addslashes())
Pregunta
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.
No hay solución correcta
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow