I have a script which already running well at other server, after I change to dreamhost hosting with PHP5, the script can not running well.
The problem is appear when I try to query like this :
$query = "SELECT * FROM data WHERE title LIKE '$input' ";
$result = mysql_query($query);
$row = mysql_fetch_array($result);
The result will be error with this message:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in....
This problem is because I use ' at it's. If I change with non ' string, than the result is ok.
How to solve this problem?
Thank you in advance.