php - Want to replace certain words using preg_replace -


hi i'm trying create database class runs queries. in sent condition parameter function like, id=$no , name='vig'. want replace values mysqli_real_escape_string, id=mysql_real_escape_string($no). this. how can using preg_replace.

i got regex when searching, don't know how use preg_replace. '/(["\'])([^"\']+)\1/'

please don't !

use prepared statements , parameterized queries using mysqli or pdo

how can prevent sql injection in php?


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

inno setup - TLabel or TNewStaticText - change .Font.Style on Focus like Cursor changes with .Cursor -