<?php
session_start();
//Get our database abstraction file
//require('mysql.php');
$to=$_SESSION['to'];
$fro=$_SESSION['fro'];
 
      
      if($fro=='townstore'){
         
          $con=mysqli_connect("localhost","vosmcyqy_tow","@@frtHY78V432SWz4@YIKU@@Lo@@@","vosmcyqy_town");
          
      }
        if($fro=='africana'){
         
         $con=mysqli_connect("localhost","vosmcyqy_af","2@RhUH7JY78@@@9823@KLULasd","vosmcyqy_afri");
          
      }
               if($fro=='safebeauty'){
         
         $con=mysqli_connect("localhost","vosmcyqy_fas","J78RhHUY765@@23@PLasd","vosmcyqy_safe");
          
      }
if (isset($_GET['searchs']) && $_GET['searchs'] != '') {
	//Add slashes to any quotes to avoid SQL problems.
	$search = $_GET['searchs'];
	$r = ("SELECT * FROM products WHERE p_name like('%" .$search . "%') ORDER BY p_name LIMIT 50");
	$sql=mysqli_query($con,$r);
	while($row= mysqli_fetch_array($sql)) {
		echo '<a href=invii.php?id=' . $row['product_id'] . '>' . $row['p_name'] . "</a>\n";
	}
}
?>