searching for multiple columns mysql and php
- by addi
i'm trying to search for multiple columns using this code:
<?php
// Connection Database
$search = $_POST ['Search'];
mysql_connect("xxxxxx", "xxxxxx", "xxxxx") or die ("Error Connecting to Database");
mysql_select_db("xxxxx") or die('Error');
$data = mysql_query("SELECT CourseName, CourseDescription, CourseLeader FROM course MATCH (CourseName, CourseDescription, CourseLeader) AGAINST ('". $search ."')
or die('Error');
Print "<table border cellpadding=3>";
while($info = mysql_fetch_array( $data ))
{
Print "<tr>";
Print "<th>Course Name:</th> <td>".$info['CourseName'] . "</td> ";
Print "<th>Course Description:</th><td>".$info['CourseDescription'] . "</td> ";
Print "<th>Course Leader:</th><td>".$info['CourseLeader'] . " </td></tr>";
}
Print "</table>";
?>
i'm getting the following error: Parse error: syntax error, unexpected T_STRING in /home/a7105766/public_html/website/scripts/coursesearchdb.php on line 30
what am I doing wrong??
cheers