I’m doing a live search with jQuery and PHP but I’m not sure if my query is vulnerable to SQL injection.
The data is posted into a PHP file while typing characters with the help of jQuery.
$searchData = $_POST['searchData'];
$searchResult = mysql_query("SELECT * FROM songs WHERE songname LIKE '$searchData%' ");
echo $searchResult;
Is this vulnerable to SQL injection?
Yes, consider if
$searchDatais: