PHP Query Database problems
@ $searchs = $_post[' search '];
?>
The search keywords you entered are:
Echo $searchs;
?>
, the search results are as follows:
if (Isset ($_post[' submit ')) {
$link = mysql_connect (' localhost ', ' root ', ' 123456 ');
if (! $link) {
Die (' Could not connect: '. Mysql_error ());
}mysql_select_db (' Doctor ');
mysql_query ("Set names ' gb2312 '");
$query = mysql_query ("Select * from Doctor where doctor_id like '% $searchs% '");
while ($data = Mysql_fetch_array ($query)) {
echo $data [1];
}};
?>
What is the problem if the output cannot be displayed after the search?
I tried to get rid of if (isset ($_post[')), the search function can be used, but has not yet searched the output of all the results
------Solution--------------------
------Solution--------------------
Your form you don't have a control named submit