adjusting my code to take the user to the search results if there is any
<p>this is the first form that in the header of the page which search my titles.</p>

<pre><code>&lt;form action="index.php?cat=search_results&amp;learn_id=1" method="post"&gt;
      &lt;div id="topSearchBodyStyle"&gt;
        &lt;input type="text" name="search" class="topSearchTextBackground" /&gt;
      &lt;/div&gt;
      &lt;div id="topSearchButtonStyle"&gt;
        &lt;input type="submit" name="submit" class="topSearchButtonBackground" value="" /&gt;
      &lt;/div&gt;
    &lt;/form&gt;
</code></pre>

<p>and this is the page called searchPage.php</p>

<pre><code>&lt;?php 

    if (isset($_POST['search'])){ 
    $getSearch = clean_text($_POST['search']);
    $connectToDb = "select * from tutorials where tutorial_title like '%".$getSearch."%' and active=1"; 
    $searchResults = $db-&gt;query($connectToDb) or die($db-&gt;error);
    $numResultas = $searchResults -&gt;num_rows;
        echo "&lt;p class='counter_search'&gt;Found : " . $numResultas . "&lt;/p&gt;";
        switch ($numResultas) {

            case 0:
            include "searchPageAdvanced.php";
            break;

            case $numResultas &gt;= 1:
            while($row = mysqli_fetch_array($searchResults)) {

            echo "&lt;a class='counter_linkHeader' href='index.php?cat=tutorials_view&amp;learn_id=5&amp;tutorial_id=".$row['tutorial_id']."'&gt;".$row['tutorial_title']."&lt;/a&gt;";
            echo "&lt;p class='counter_description'&gt;";
            $your_desired_width=200;
            $description=$row['content'];
            if (strlen($description) &gt; $your_desired_width) {$description = wordwrap($description, $your_desired_width); $description = substr($description, 0, strpos($description, "\n"))." ..."; } echo $description;
            echo"&lt;/p&gt;";    
        }
            break;
            }

    }else{ 
    ?&gt;
    &lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;table width="875" border="0"&gt;
  &lt;tr&gt;
    &lt;td align="center" valign="middle"&gt;&lt;img src="http://bytes.com/images/searchError.jpg" width="223" height="147" alt="search error" /&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td align="center" valign="middle"&gt;Sorry you came here by mistake &lt;br /&gt;
      please use the search box to get results&lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
    &lt;?php
    }
?&gt;
</code></pre>

<p>and the is the advanced search page.
which will search the content.</p>

<pre><code>&lt;form action="" method="post"&gt;

        &lt;input type='text' name='searchAdv' /&gt;

        &lt;input type='submit' name='submit_adv' value='Search' id="submit_adv" /&gt;
    &lt;/form&gt;
    &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td align='center' valign='middle'&gt;&lt;p&gt;Sorry you came here because your search didn't &lt;/p&gt;
      &lt;p&gt;meet any of the content try advanced!!&lt;/p&gt;&lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;

&lt;?php
    if (isset($_POST['submit_adv'])){
    $getSearch = clean_text($_POST['searchAdv']);

    $connectToDb = "select * from tutorials where content like '%".$getSearch."%' and active=1"; 
    $searchResultsAdv = $db-&gt;query($connectToDb) or die($db-&gt;error);

    while($rowAdv = mysqli_fetch_array($searchResultsAdv)) {

            echo "&lt;a class='counter_linkHeader' href='index.php?cat=tutorials_view&amp;learn_id=5&amp;tutorial_id=".$rowAdv['tutorial_id']."'&gt;".$rowAdv['tutorial_title']."&lt;/a&gt;";
            echo "&lt;p class='counter_description'&gt;";
            $your_desired_width=200;
            $description=$rowAdv['content'];
            if (strlen($description) &gt; $your_desired_width) {$description = wordwrap($description, $your_desired_width); $description = substr($description, 0, strpos($description, "\n"))." ..."; } echo $description;
            echo"&lt;/p&gt;";    
        }
    }
  ?&gt; 
</code></pre>

<p>now again the problem begin in the advanced search page, the search page is working fine </p>

<p>but when I search in the advanced page it return the page empty like he didn't take any thing for the input area <code>SearchAdv</code></p>
