Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Special chars in a databasefield

Status
Not open for further replies.

OldSmelly

Programmer
Nov 22, 2001
70
NL
Hello All,

I have a problem with a field on the screen (and in a mysql database).. Here in the netherlands we have names like "in 't veld" as lastname and here it goed wrong....

If I redisplay the field for example after a validation function the field display "in \'t Veld"

I have tried things like
$voorv = mysql_real_escape_string($voorv);

But that isn't it :D

What to do ?

Thanks in advance

Hans Rumpff
 
when you WRITE data to the database do the following

Code:
mysql_query ("
insert into table
set 
field1 = '". mysql_escape_string("in 't voed") . "');

you will not need to strip slashes or anything on retrieving the data.

make sure that you are not using magic_quotes on incoming variables. manage all quoting and escaping yourself. much cleaner then.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top