PHP замените пространство на подчеркивание
$str = str_replace(' ', '_', $str);
Annoyed Alpaca
$str = str_replace(' ', '_', $str);
$str = str_replace(' ', '_', $str);
if(!empty($user_name) && !empty($password) && !is_numeric($user_name))
{
// read from database
$query = "select * from users where user_name = '$user_name' limit 1";
$result = mysqli_query($con,);
if(!empty($user_name) && !empty($password) && !is_numeric($user_name))
{
// read from database
$query = "select * from users where user_name = '$user_name' limit 1";
$result = mysqli_query($con, $query);