Yesideez Posted July 11, 2007 Share Posted July 11, 2007 I'm passing a search string to a script via the URL, somethign like this: ?search= The only characters I want this to contain are alphanumeric and a period - what's the best way to do this? Link to comment https://forums.phpfreaks.com/topic/59377-solved-preparing-a-string-for-a-mysql-query/ Share on other sites More sharing options...
Yesideez Posted July 11, 2007 Author Share Posted July 11, 2007 Sorted. $strFind=str_replace(array("'",';','`','\\'),'',$strFind); Link to comment https://forums.phpfreaks.com/topic/59377-solved-preparing-a-string-for-a-mysql-query/#findComment-294973 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.