Escape String For Like Query

/ Published in: PHP
Save to your folder(s)

Simple way to escape string for LIKE statements, useful for searches.

Copy this code and paste it in your HTML
  1. addcslashes(mysql_real_escape_string($_POST['search']), '%_')


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.