Escape string
#1

Alright so Ive got a simple question, since I want to avoid any data injection, could I simply do things such as

PHP код:
mysql_format(mysqlquery,sizeof(query),"UPDATE `players` SET `Username`='%e' WHERE `ID`=%d",NewName,AccInfo[playerid][ID]);
    
mysql_tquery(mysqlquery); 
Or Id have to escape the string other way?

Im trying to understand how it all works.

So basically is it enough if I use '%e' when formating or I have to still do something to avoid data injection?
Reply


Messages In This Thread
Escape string - by Squirrel - 10.01.2016, 22:58
Re: Escape string - by ikey07 - 10.01.2016, 23:01
Re: Escape string - by Squirrel - 10.01.2016, 23:02
Re: Escape string - by itsCody - 10.01.2016, 23:10
Re: Escape string - by Squirrel - 10.01.2016, 23:19
Re: Escape string - by yvoms - 10.01.2016, 23:19

Forum Jump:


Users browsing this thread: 4 Guest(s)