php mysql中意外的布尔值

I know for a fact that the content of inputbox that I'm submitting exists in table1, yet this query:

$check = mysqli_query($con, "SELECT name FROM table1 WHERE name=$_POST[inputbox]");

var_dump($check);

is giving me a bool(false)

What am I doing wrong?

Maybe try:

$check = mysqli_query($con, "SELECT name FROM table1 WHERE name='".$_POST[inputbox]."'");

A general advice, if you want to know whats going wrong, use mysqli_error():

$result = mysqli_query($con, '......');
if(!$result) {
    die(mysqli_error($con));
}

Check if the $con var is true because if the connection failed you will always get bool(false).

If it is ok try to update the query by name LIKE '" . $_POST[inputbox] . "';