I am trying to insert user details into a table i have created using phpmyadmin on a local host server.
the connections are fine and the first user gets inserted into the table no problem.
when I attempt to add another user it does not show in the table in phpmyadmin nor do i get any kind of error.
I have a feeling its something to do with the table configuration but i cannot find any info on this, can something please help.
The Insert code
$result = db_query("INSERT INTO registration_list (first_name, last_name, student_number, email, activation_code, status, time_created, time_updated)
VALUES (
'$fname',
'$sname',
'$studentNo',
'$email',
'$code',
'awaiting approval',
now(),
now()
)");
The connection
function db_connect(){
static $connection;
if(!isset($connection)) {
$connection = connectLocalHost($connection);
}
if($connection === false) {
return db_error();
}
return $connection;
}
function db_query($query) {
// Connect to the database
$connection = db_connect();
// Query the database
$result = mysqli_query($connection,$query);
return $result;
}