I am writing a little script that has a form input to input into a mysql database.
People will type something like:
"It's a very good club"
The problem is that "It's" needs to be "It\'s" in order to input into the database, otherwise it throws a wobbly.
There are a lot of fields in the form.
I have written a bit of code to change the "'" to "\'" in one of the fields:
$club_details = str_replace( "'", $change, $club_details);
My question is:
Is it possible to do this for ALL the fields with one bit of script, or would I have to do the same for EVERY field ???
Any advise will be welcome (as long as it's what I want to hear !!!)
I notice that this forum will accept It's without me delimiting it.