$get_data = $_POST['tb1']; $host = "localhost"; $username = "root"; $password = "1234"; $db = "dall"; $mysql_con = mysql_connect($host,$username,$password); if($mysql_con){ $mysql_select = mysql_select_db($db); $sql = "SELECT *FORM rabbit WHERE dall_name LIKE'%$get_data%'"; $myql_q = mysql_query($sql); while($result = mysql_fetch_array($mysql_q)){ echo $result =['rabbit_id']; echo $result =['rabbit_name']; echo $result =['rabbit_price']; echo $result =[rabbit_spec']; } } else{ echo "not ok"; } ?>