How to replace particular characters

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
smileboy
Forum Newbie
Posts: 20
Joined: Wed Mar 11, 2009 6:58 am
Location: Tashkent, Uzbekistan

How to replace particular characters

Post by smileboy »

hi, i have a form to insert data into database and i'm having some problems on entering new data.

when user inserts characters like $ ' &, it is not inserting the whole text to database.

what i wanted to do is, when user insert those characters, it automatically replaces them with other characters like $ with USD, ' with ` and & with and.

if you know the solution for this problem, please help

thanx
User avatar
jayshields
DevNet Resident
Posts: 1912
Joined: Mon Aug 22, 2005 12:11 pm
Location: Leeds/Manchester, England

Re: How to replace particular characters

Post by jayshields »

Post Reply