Georg: Parser error aufgrund Wildcards?

Beitrag lesen

Hallo,
hab mir ein dynamisches Suchfomular mit checkboxen gebastelt und erhalte immer einen Parsererror in der Zeile, wo die <form> beginnt.

unexpected error in T_Variable

Hängt das mit der Wildcard (%) zusammen, oder warum sonst?

...
<table border="2" cellpadding="0" cellspacing="0" width="100%">
<?php
if (isset($submit)) {
 unset($submit);

$Name1 = trim($_POST["Name1"]);
$country = $_POST["cntry"];
$Field = $_POST["field"];
$Initator = $_POST["initator"];
$Friend = $_POST["Friend_Name"];
$PET = $_POST["PET"];
$Friend = $_POST["Friend_Name"];
//Variablencheck checkboxes:
$Cat = $_POST["Cat"];
$rabbit = $_POST["rabbit"];
$Dog = $_POST["Complete"];
$other = $_POST["Other"];

// Überprufung der Werte der Variablen, ob leer
 if ($Name1 ==""){$Name1 = '%';}
 if ($country ==""){$country = '%';}
 if ($Initator ==""){$Initator = '%';}
 if ($Friend ==""){$Friend = '%';}
 if ($PET ==""){$PET = '%';}
 if ($Cat ==""){$Cat = '%';}
 if ($Dog ==""){$field = '%';}
 if ($other ==""){$other = '%';}

$query = @mysql_query("SELECT * FROM $table WHERE Name1 LIKE '$Name1%' AND country LIKE '$country%' AND Initator LIKE '$Initator%' AND Friend LIKE '$Friend%' AND PET LIKE '$PET%' AND Cat LIKE '$Cat%' AND Dog LIKE '$Dog%' AND other '$other%') or die('Selection failed!');
$result = mysql_query($abufrage);
while($row = @mysql_fetch_object($result))  {
?>
<table>
<tr>
<td><?php =$row->Name1?></td>
<td><?php =$row->Friend?></td>
<td><?php =$row->Initator?></td>
<td><?php =$row->country?></td>
<td><?php =$row->Dog?></td>
<td><?php =$row->Pet?></td>
<td><?php =$row->Cat?></td>
<td><?php =$row->field?></td>
<td><?php =$row->other?></td>
</tr></table>
<?php
)
?>

<form method="post" action="<?php $PHP_SELF ; ?>" class="formlabel">
  <tr>
  <td width="70%" bgcolor="#0099FF"><font size="-1">This is the searching site!</font></td>
  <td width="10%" align="center" bgcolor="#0066FF"><a href="logout.php"><font size="-1" color="#000000"><b>LOGOUT</b></font></a></td>
  </tr>
 </table>

<table align="left">
  <tr>
    <td colspan="3"><font color="#FF0000" size="4">Please choose:</td>
    <td align="center"><div align="right"><b>Country:</b> </div></td>
    <td align="left"><select name="cntry">
        <option selected></option>
        <?php
$query = @mysql_query("SELECT * FROM country_list_table ORDER BY Country");

while ($result = @mysql_fetch_array($query)) {
  $country=$result['Country'];
           echo ("<option value$country">$country</options>");
     }
?>
      </select></td>

usw....

Danke für jeden Tipp,

Georg