title: How to search a mysql data base via php script. (not working)
body: <p>I can not return results with the php scritp that quires the database and echos results? All i get is fetched data successfully. Any help would be great and thanks.</p>
  
  <pre><code>&lt;form action="#" method="get"&gt;
  search: &lt;input type="text" name="Id"&gt;&lt;br&gt;  
  &lt;input type="submit" value="delete"&gt;
  &lt;/form&gt;
  
  &lt;?php
  $dbhost = 'localhost:3036';
  $dbuser = 'root';
  $dbpass = '#####';
  $conn = mysql_connect($dbhost, $dbuser, $dbpass);
  if(! $conn )
  {
  die('Could not connect: ' . mysql_error());
  }
  $search = $_GET['search'];
  if($_GET){
  $sql = 'SELECT Id, Employee_Name, 
             Employee_Email
      FROM Blog
      WHERE Id LIKE "%$sql%"';
  
   mysql_select_db('test');
   $retval = mysql_query( $sql, $conn );
   if(! $retval )
   {
   die('Could not get data: ' . mysql_error());
  }
  while($row = mysql_fetch_array($retval, MYSQL_ASSOC))
  {
  echo "Tutorial ID :{$row['Id']}  &lt;br&gt; ".
       "Title: {$row['Employee_Name']} &lt;br&gt; ".
       "Author: {$row['Employee_Email']} &lt;br&gt; ".
       "--------------------------------&lt;br&gt;";
  } 
  echo "Fetched data successfully\n";
  }
  mysql_close($conn);
  ?&gt;
  </code></pre>