Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 362
  • Last Modified:

$queryString only letters and numbers

mysql_query("insert into table1(column1) values (''$queryString");

I am getting values from php $queryString
which only has letters and numbers

what code do I need to add  to make $querySafe so no injection
and do not want to use pdo
0
rgb192
Asked:
rgb192
1 Solution
 
gr8gonzoConsultantCommented:
$queryString = preg_replace("/[^a-zA-Z0-9]/","",$queryString);
0
 
rgb192Author Commented:
thanks
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now