<?php
if($_SESSION['logat'] != 'Da'){
	if($_SESSION['nr_produse'] == ''){
$sql_cautare = "SELECT * FROM `produse`";
	//$rows = mysql_num_rows($sql_cautare);	
	//$rows = $mysqli->num_rows($sql_cautare);
	$rows = $mysqli->query($sql_cautare);
		$_SESSION['nr_produse'] = $rows;
	// $result = $mysqli->query("SELECT * FROM `produse`");
		// $row = $result->fetch_assoc();
			// echo htmlentities($row['_message']);
			echo $rows;
	}
echo'<form action="index.php" method="get">
			<input id="" type="text" name="cauta" value="'.$_GET['cauta'].'" autocomplete="off">
			<input id="" type="submit" name="submit" value="Cauta in produse">
		</form>';
		
}
		// echo'<form action="index.php" method="get">
			// <input id="" type="text" name="cauta" value="'.$_GET['cauta'].'">
			// <select id="" name="ordonare" onchange="this.form.submit()">
				// <option value="pret_crescator" '.$selected1.'>Pret crescator</option>
				// <option value="pret_descrescator" '.$selected2.'>Pret descrescator</option>
				// <option value="nume_ascendent" '.$selected3.'>Nume ascendent</option>
				// <option value="nume_descendent" '.$selected4.'>Nume descendent</option>
			// </select>
		// </form>';
?>   