I've got a problematic query that is driving me nuts and it is too late in the day for me to think straight...
The query fails when there is an apostrophe or single quote in the $newcomment variable being passed through PHP.
Is there a way to push this query through without messing with the contents of the $newcomment variable?
- - picklefish - -
Why is everyone in this forum responding to me as picklefish?
Code:
UPDATE table SET Comments = '$newcomment' WHERE DateID = '$today'
The query fails when there is an apostrophe or single quote in the $newcomment variable being passed through PHP.
Code:
example:
$newcomment = "I'm unsuccessful"; //Fails
$newcomment = "I am successful"; //Works
Is there a way to push this query through without messing with the contents of the $newcomment variable?
- - picklefish - -
Why is everyone in this forum responding to me as picklefish?