I am trying to update the table but nothing is changing. The database name and fields are correct.
First, I suggest you read the prepared statements quickstart guide which would lead you to something like this...
$stmt = $con->prepare('UPDATE pupils SET signin = ? WHERE forname = ?');
$stmt->bind_param('ss', $newval, $forname);
$stmt->execute();
As an added bonus, you should set mysqli to throw exceptions on error so you don't have to check return values all the time. In your config.php
file, before creating the connection, do this...
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
$con = new mysqli(...); // or however you create $con
and as mentioned in the comments, the php.ini
file in your development environment should enable full error reporting with the following directives
error_reporting = E_ALL
display_errors = On
To directly answer your question, you're missing an equals sign for the <select>
elements name
attribute. It should be
<select class="form-control" name="name" id="name">