将字符串保存到数据库

I am trying to save a string which is just $id = "27491"; into a database table called users under a field called user id here's what I have tried currently but it's not working...

mysqli_query($DB,"INSERT INTO `users` SET `id` = '".$id."'");

enter image description here

EDIT: The content just does not go into the database, the issue before was just a typo.

Also does not work with my $title string.

mysqli_query($DB,"INSERT INTO `users` SET `title` = '".mysqli_real_escape_string($DB,$title)."'");

You can use like below, One more suggetion for you, this is not good practice to use space in field name. So, you can use field name like user_id, this is good to go.:

mysqli_query($DB,"INSERT INTO `users` SET `user id` = '".$id."'");
//                                                              ^ you miss

OR

mysqli_query($DB,"INSERT INTO `users` (`user id`) VALUES('".$id."')";

Parenthesis aren't closing in your code...

mysqli_query($DB,"INSERT INTO `users` SET `user id` = '".$id."'");

Please try this. I hope this will help you. Change your query to -

mysqli_query($DB,"INSERT INTO `users` SET `title` = ".mysqli_real_escape_string($DB,$title));