I want to achieve just start to display all the database table information, follow the input box query, only display the contents of the query, the rest does not appear, how to change it, I now only do the show all the information!!
Include ("inc/conn.php");
?>
<title>Test</title>
| Position |
Company |
Number |
Professional |
if (!isset ($_post[' search ') | | Trim ($_post[' search ') = = ') {$_post[' search ']= '; } $find = $_post[' search ']; $result =mysql_query ("select * from job where title like '%". $inputkey. " %'"); while ($myrow =mysql_fetch_array ($result)) {?>
| |
|
|
|
Reply to discussion (solution)
The form was wrongly written.
Change it.
$inputkey where is this variable obtained from?
There is no name in your line, and the form values accepted by PHP are accepted according to the name value.
The front page of our company is always written in this way without writing the name value ...
Input does not add the name attribute, how does PHP get it?
There is also a problem with the value query
$inputkey = isset ($_post[' Inputkey ')? $_post[' inputkey ': ';
$result =mysql_query ("select * from job where title like '%". $inputkey. " %'");
Thank you, the problem is solved, the final code is this
Include ("inc/conn.php");
?>
Test
| Position |
Company |
Number |
Professional |
if (!isset ($_post[' search ') | | Trim ($_post[' search ') = = ') {//$_post[' search ']= ';//}//$find = $_post[' search ']; $inputkey = isset ($_post[' Inputkey ')? $_post[' inputkey ': '; $result =mysql_query ("select * from job where title like '%". $inputkey. " %'"); while ($myrow =mysql_fetch_array ($result)) {?>
| |
|
|
|