Can you change excel sheet and make it importable into mysql tables?
Yes, it can be done. You can convert it to CSV and the use fgetcsv() and prepared statements. Search for PHPExcel or similar. If you use MariaDB, a MySQL fork, then you can use the ODBC connect engine to attach the excel file to a table and run a query to insert the rows into the destination table, see:
Do you mean with a dedicated interface a thing like cPanel?
Yes. Sometimes you can edit configuration files only through these forms. You can, also, try to write a custom php.ini file and save it into the document root, success however depends on hosting configuration: if it is allowed then it will override the defaults.
Are you using PHP-FPM? In such cases the PHP engine can be located into another server and accessed through an IP address. The address is configured in the web server config files and the php.ini file is in the remote server. You can probably use ini_set() by including a script in top of the others. Through .htaccess this is done like this:
php_value auto_prepend_file "/path/to/iniset.php"
Otherwise in PHP:
I would also check with hosting documentation to see if you can set the directives through a dedicated interface.
The loop is not executing the insert query, because the statement is executed at line 13. So only the last will be inserted. The insert can fail for different reasons:
$id does not increment through the loops, i.e. with: $i++;
when you execute the form again, $id will start from zero and if column ref is a primary key, it will generate an error for duplicate entry
It is better to use auto_increment on MySQL side and remove the column from the insert statement. The loop, by itself, seems fine, but the error refers to line 24, here there are only 14 lines: do you have other loops in the add script?
if you can edit the main php.ini file, change the option to on:
then reload the phpinfo page to see if it applied. The location of the file is defined in the Configuration File (php.ini) Path of the phpinfo view. If you cannot edit the main php.ini, you can try to create a new php.ini file in the document root. And just add the options you want to change. The Loaded Configuration File field of the phpinfo view should show if the new file is loaded.
Note: some times, the configuration (of PHP or of the web server) does not allow to override the settings through custom php.ini files, so you may need to contact your hosting support to make changes.
IMHO it's best printing the name on the usb case and let the client reuse the drive. Otherwise you have to change the firmware of the usb to act like a CD, see if this helps: https://superuser.com/a/822578
Thanx for your reply but I am still facing the same issue.
Can't store values of text fields in variables
You're welcome, but I was not suggesting a fix, I suggested you to run those functions in order to see if there are errors in your database connection, in the query syntax or if it rises a duplicate entry error (due to unique columns). If you don't get any errors, then check if the $_POST array is populated and if it gets the correct index names: