10-04-2007, 10:36 PM
|
#5 (permalink)
|
|
The Prestige
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
|
Change
PHP Code:
$result = mysql_query("SELECT * FROM resumes WHERE MATCH (body) AGAINST ('%search%')");
to
PHP Code:
$result = mysql_query("SELECT * FROM resumes WHERE MATCH (body) AGAINST ('".%$search%."')");
You forgot to add the variable $search, right now you're not searching for the input search, you're actually search for the word "search".
PHP Code:
while($r=mysql_fetch_array($result))
to
PHP Code:
while($r=mysql_fetch_array($result, MYSQL_ASSOC))
PHP Code:
$lastname=$r["lastname"]; $body=$r["body"]; $id=$r["id"];
to
PHP Code:
$lastname=$r['lastname']; $body=$r['body']; $id=$r['id'];
Eventhough it won't make much difference, it's still the most used way to go..
Also, don't use html breaklines, use xhtml breaklines:
|
|
|
|