The script does not work. why?

if (isset($_POST['id']) && isset($_POST['first_name']) && isset($_POST['screen_name']) && isset($_POST['sex']) && isset($_POST['bdate']) && isset($_POST['photo_big'])){

 // Variables from the form
 $id = $_POST['id'];
 $first_name = $_POST['first_name'];
 $screen_name = $_POST['screen_name'];
 $sex = $_POST['sex'];
 $bdate = $_POST['bdate'];
 $photo_big = $_POST['photo_big'];

 // Parameters to connect
 $db_host = "localhost"; 
 $db_user = "888888"; // database Login
 $db_password = "888888"; // Password database
 $db_base = '888888'; // database Name
 $db_table = "mybase"; // Name of DB Table

 // Connect to database
 $mysqli = new mysqli($db_host,$db_user,$db_password,$db_base);

 // If there is a connection error, display it and kill the connection
 if ($mysqli->connect_error) {
 die('Error : ('. $mysqli->connect_errno .') '. $mysqli->connect_error);
}

 $result = $mysqli->query("INSERT INTO ".$db_table." (id,first_name,screen_name,sex,bdate,photo_big) VALUES ('$id','$first_name','$screen_name','$sex','$bdate','$photo_big')");

 if ($result == true){
 echo "Information added to database";
}else{
 echo "the Information is not recorded in the database";
}
 }


the code does not connect to the database prompt for what?
April 7th 20 at 15:19
2 answers
April 7th 20 at 15:21
Maybe because of the single quotes where the name of the database this is only an assumption
April 7th 20 at 15:23
Don't see the error. Maybe it's not in this code, and processing form data. Check out:
1. come whether the data in the script?
2. do I need to process the entered data? (dates require treatment)

Find more questions by tags PHP