View Single Post
Old 10-04-2007, 03:53 PM   #1 (permalink)
Jess
The Wanderer
 
Join Date: Sep 2007
Location: Texas
Posts: 7
Thanks: 0
Jess is on a distinguished road
Default printing results

Hello, I am a newb with PHP and MySQL, so please forgive me if I am way off here. I am attempting to search my resume database, for some reason I cannot get the results to display. I can't figure out what I am doing wrong!
Here is what I have, any suggestions on where to read more about doing this would be greatly appreciated!


$search=$_POST["search"];
//get mysql and store them in result
$result = mysql_query="SELECT * FROM resumes WHERE MATCH (body) AGAINST ('%search%')";

//grab all the content
while($r=mysql_fetch_array($result))
{
$lastname=$r["lastname"];
$body=$r["body"];
$id=$r["id"];
//display the row
echo "$lastname <br> $body <br> $id <br>";
}
?>
Jess is offline  
Reply With Quote