PHP MYSQL LIKE
Posted: Thu Apr 17, 2008 9:53 pm
The user types something in a textbox.
e.g. s3
This is the end of MYSQL statement
AND dname LIKE '%$dname%'.
If i wanted to get 'sample3', s3 will not work, because the letters have to be together, 'sam' would work.
how can i get 'sample3' from typing in 's3'
e.g. s3
Code: Select all
echo "<td><input type=text name=dname></td>";
$dname=$_POST(dname);AND dname LIKE '%$dname%'.
If i wanted to get 'sample3', s3 will not work, because the letters have to be together, 'sam' would work.
how can i get 'sample3' from typing in 's3'