Jump to content

escape problem


robert_gsfame

Recommended Posts

I have this

 

$string=$_GET['name'];

$query=mysql_query(sprintf("SELECT * FROM table1 WHERE username='%s' AND name REGEXP '[[:<:]]$string[[:>:]]'=1",

mysql_real_escape_string($username)));

 

and i get the error

 

parse error, unexpected '[', expecting T_STRING or T_VARIABLE or T_NUM_STRING

 

which part should be modified??

Link to comment
https://forums.phpfreaks.com/topic/207409-escape-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.