Jump to content

[SOLVED] apostrophe problems


Gnub

Recommended Posts

When ever i try to insert a record, and one of the fields contains a apostrophe, ( ' ), it throws an error at me.

 

So for example, if i try to insert a name called " O'Brian " , it wont accept it.

 

Is there anything i can do, either on PHP or on the MySQL database to solve this small issue?  changing of character sets? or something?

 

Thanks in advance.

 

Gnub.

Link to comment
Share on other sites

basically, what i've done is used a str_replace, to add the slashes.

 

I could use the add slash, see which one im happy using.

 

Error was basically, you have an error in your sql query, no specific info, but i discovered it was with the apos.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.