I have a problem with my search engine. I can search but when clicking the link this what come out "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Pacina' at line 1"... I dont know how to fix it.Your answer might be a big help for me.. :)
This is my code:
<?php
mysql_connect("localhost","root","");
mysql_select_db("infokiosk");
$name=$_GET['name'];
$sql = mysql_query("select * from basicinfo WHERE name=$name") or die(mysql_error());
While($row = mysql_fetch_array($sql)) {
$id= $_GET['id'];
$name=$_GET['name'];
$description=$_GET['description'];
{
?>
<tr>
<td><?php echo $name; ?></td><?php echo $description; ?>
</tr>
</div>
<?php }} ?>
<br>
<?php
$sql = mysql_query("select * from staffreg WHERE name LIKE '%$search%' or description LIKE '%$search%' or keyword LIKE '%$search%'") or die(mysql_error());
While($row = mysql_fetch_array($sql)) {
$id= $row['id'];
$name=$row['name'];
$description=$row['description'];
{
?>
<tr>
<td><?php echo $name; ?></td>
<?php echo $description; ?>
<?php echo $status; ?>
</tr>
</div>
<?php }}?>
<?php
$sql = mysql_query("select * from search WHERE name LIKE '%$search%' or description LIKE '%$search%' ") or die(mysql_error());
While($row = mysql_fetch_array($sql)) {
$id= $row['id'];
$name=$row['name'];
$description=$row['description'];
$content=$row['content'];
{
?>
<tr>
<td><?php echo $name; ?><br> <?php echo $content ?></td>
</tr>
</div>
<?php }}?>
I dont know what/where line is the problem.. :( thanks in advance.. :)