robert_gsfame Posted July 11, 2010 Share Posted July 11, 2010 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 More sharing options...
trq Posted July 11, 2010 Share Posted July 11, 2010 That is a php error and I suspect it is occurring prior to the code you have posted. Link to comment https://forums.phpfreaks.com/topic/207409-escape-problem/#findComment-1084381 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.