I am thinking the database user does not has enough permissions to create/alter/insert to database. If it was an error in mysqli database connection, then you would not have been able to see scoring etc. For error reporting, check your PHP code files of this script, look for something like this: error_reporting( some values or numbers here );
Create a new database user in cpanel > MySQL databases Go back to "MySQL databases", and scroll down to the section where it says add user to database. Select this new user, select your database and proceed. On next page it will ask you to select permissions. Tick the "All privilidges" checkbox, and proceed. Then change the $user and $password values in this php script to match the database user and password of the user you just created. And run the script again.
My host provider doesn't appear to have that option. The php code all works, which displays the quizzes and does the scoring, but the mysql extensions, which save the info to the db, don't work at all.
My provider doesn't have options like this (cpanel?) and I see nowhere to set permissions. The tool they provide for working with databases is phpmyadmin. I removed and re-created the db, entered the new access info, and ran the script again with the same result. No table created.
Ok I found the reason the code won't work. My web host provider has disabled the CREATE TABLE command (and others for mysql) in php, an undocumented "feature" of their hosting package. The version of php 7 support they give has eliminated db manipulation by php unless you rent a dedicated server from them. Needless to say, I'm firing them. Any suggestions for a good shared hosting provider?
A hosting provider that does not allows to create tables in database, that's new! All the crappy things these hosting providers do... I use hostgator shared hosting for some of my sites. works fine, support is also good, is not costly either.