Need Help on This (Search)

Sorry if i posted in the wrong place but i been told that its a javascript problem.

I have a project to do for this company and on the main website I have to get this to work. The site layout has a search box on the top right http://testsite2.comze.com/test and they have a page called business directory http://testsite2.comze.com/test/businessdirectory.php and its iframe with this site http://testsite2.comze.com/test/search/index.php

Trying to get it to where when the users type in the search box on the top right it will show the results in the iframe of the other site business directory on the iframe middle of the main site.

When u type in “ho” and click enter it takes you to the search site and show’s the results there but trying to get it to show the results in the same site but in the iframe. (only business Directory search box is working to try it)

The code for the search box on main layout is:

<form action="./search/index.php" method="get" target="myiframe">
<input name="query" class="search" type="text" value='<?php echo $query; ?>' "/>
</form> 

The code for the businessdirectory.php that holds the link for the site to be iframe is:

<p><iframe id="myiframe"  src ="http://testsite2.comze.com/test/search" width="100&#37;" height="580" frameBorder="0">
  <p>Your browser does not support iframes.</p>
</iframe></p>

This is the code for the search site thats the iframe site:
The code for the search/index.php thats in iframe from the search site:



<?php
$query = mysql_real_escape_string($_GET[‘query’]);
?>
<form action=‘index.php’ method=‘get’ id=“myiframe”>
<center><h2>Search</h2><br />

&lt;input type='text' name='query' size='50' value='&lt;?php echo $query; ?&gt;' /&gt;
&lt;br /&gt;
&lt;input type='submit' value='Search!' /&gt;
&lt;/center&gt;
&lt;/form&gt;


<!-- results -->
<?php
    


if($query != ''){
    $per_page = 10;


    $start = $_GET['start'];

    //count records
    $record_count = mysql_num_rows(mysql_query("SELECT * FROM businesses WHERE keywords LIKE '%$query%'"));
  
      if($record_count == 0){
echo "No records found";
}
    
    //count max pages
    $max_pages = $record_count / $per_page; //may come out as decimal

    if (!$start)
       $start = 0;
      
    //display data
    $get = mysql_query("SELECT * FROM businesses WHERE keywords LIKE '%$query%' LIMIT $start, $per_page");
    while ($row = mysql_fetch_assoc($get))
    {
     // get data
     $name = $row['name'];
     $description = $row['description'];
     $id = $row['id'];
    
    
     echo "<b><a href='business.php?id=$id'>".$name."</a></b>";
     echo "<br />";
     echo $description;
     echo "<br /><br />";
    

    }

    //setup prev and next variables
    $prev = $start - $per_page;
    $next = $start + $per_page;

    //show prev button
    echo "<br /><br />";
    if (!($start<=0))
           echo "<a href='index.php?start=$prev&query=$query'>Prev</a> ";

    //show page numbers

    //set variable for first page
    $i=1;

    for ($x=0;$x<$record_count;$x=$x+$per_page)
    {
     if ($start!=$x)
        echo " <a href='index.php?start=$x&query=$query'>$i</a> ";
     else
        echo " <a href='index.php?start=$x&query=$query'><b>$i</b></a> ";
     $i++;
    }

    //show next button
    if (!($start>=$record_count-$per_page))
           echo " <a href='index.php?start=$next&query=$query'>Next</a>";
}
?>

Updated Fix it …

added target=“”

<form action="./search/index.php" method="get" target="myiframe">
<input name="query" class="search" type="text" value='<?php echo $query; ?>' "/>
</form>

Had it as id=“” and change it to name=“”

<p><iframe id="myiframe"  src ="http://testsite2.comze.com/test/search" width="100&#37;" height="580" frameBorder="0">
  <p>Your browser does not support iframes.</p>
</iframe></p>

had id=“” didn’t work so i deleted id=“” and it works fine

<?php
    $query = mysql_real_escape_string($_GET['query']);
    ?>
    <form action='index.php' method='get' id="myiframe">
    <center><h2>Search</h2><br />
   
    <input type='text' name='query' size='50' value='<?php echo $query; ?>' />
    <br />
    <input type='submit' value='Search!' />
    </center>
    </form>