i have created a database in phpmyadmin. When I submit the form, the script is supposed to insert data in the database. However, i get the error "No database selected". Could you please look at my code and see if you can find where I went wrong. Thank you
$dbc = mysqli_connect('localhost','aliendatabase') or die('Error connecting to MySQL server.');
$query = "INSERT INTO aliens_abduction (first_name, last_name, when_it_happened, how_long, ".
"how_many, alien_description, what_they_did, fang_spotted, other, email) " .
"VALUES ('$first_name', '$last_name', '$when_it_happened', '$how_long', '$how_many', " .
"'$alien_description', '$what_they_did', '$fang_spotted', '$other', '$email')";
$result = mysqli_query($dbc, $query)
or die(mysqli_error($dbc));
mysqli_close($dbc);